Prepare release spire-api 0.4.0 (#213) #32
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: Publish Crates | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| jobs: | |
| build-and-publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| submodules: recursive | |
| - name: Cache Project | |
| uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2 | |
| - name: Install toolchain | |
| uses: ./.github/actions/setup-env | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Cargo Login | |
| run: cargo login ${{ secrets.CRATES_IO_TOKEN }} | |
| # Publish spiffe crate | |
| - name: Publish spiffe | |
| if: startsWith(github.ref, 'refs/tags/spiffe-') && | |
| !startsWith(github.ref, 'refs/tags/spiffe-rustls-') | |
| run: | | |
| cd spiffe | |
| cargo publish | |
| # Publish spire-api crate | |
| - name: Publish spire-api | |
| if: startsWith(github.ref, 'refs/tags/spire-api-') | |
| run: | | |
| cd spire-api | |
| cargo publish | |
| # Publish spiffe-rustls crate | |
| - name: Publish spiffe-rustls | |
| if: startsWith(github.ref, 'refs/tags/spiffe-rustls-') | |
| run: | | |
| cd spiffe-rustls | |
| cargo publish |