Merge pull request #18 from cryptape/fix/trusted-publishing-auth #2
Workflow file for this run
This file contains hidden or 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: Deploy | |
| on: | |
| push: | |
| tags: ['v*'] | |
| jobs: | |
| publish: | |
| name: Publish to crates.io | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: rustup update 1.76.0 && rustup default 1.76.0 | |
| - name: Run tests | |
| run: cargo test --verbose | |
| env: | |
| RUSTFLAGS: "-Dwarnings" | |
| - uses: rust-lang/crates-io-auth-action@v1 | |
| id: auth | |
| - name: Publish | |
| run: cargo publish | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} |