Publish to crates.io #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to crates.io | |
on: | |
push: | |
tags: | |
- "v*" | |
workflow_dispatch: | |
jobs: | |
publish: | |
name: Publish | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install Packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgl1-mesa-dev mesa-common-dev libsdl2-dev libglm-dev | |
- name: Update Local Toolchain | |
run: | | |
rustup update | |
rustup component add clippy | |
- name: Toolchain Info | |
run: | | |
cargo --version --verbose | |
rustc --version | |
cargo clippy --version | |
- name: Lint | |
run: | | |
cargo fmt -- --check | |
# cargo clippy -- -D warnings | |
- name: Run Tests | |
run: | | |
cargo check | |
# cargo test --all | |
- name: Wait On Publish_SYS | |
uses: tomchv/wait-my-workflow@v1.1.0 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
checkName: 'Publish_SYS' | |
ref: ${{ github.sha }} | |
intervalSeconds: 30 | |
timeoutSeconds: 3600 | |
- name: Publish | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
run: | | |
cargo publish --token $CARGO_REGISTRY_TOKEN |