release: v0.4.0 #5
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| permissions: | |
| contents: write | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| # Create GitHub release | |
| create-release: | |
| name: Create Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| draft: false | |
| prerelease: false | |
| generate_release_notes: true | |
| # Publish to crates.io | |
| publish-crate: | |
| name: Publish to crates.io | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Publish macros crate | |
| run: cargo publish --manifest-path problemreductions-macros/Cargo.toml --token ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| - name: Wait for macros crate to be indexed | |
| run: sleep 30 | |
| - name: Publish main crate | |
| run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| - name: Wait for main crate to be indexed | |
| run: sleep 30 | |
| - name: Publish CLI crate | |
| run: cargo publish --manifest-path problemreductions-cli/Cargo.toml --token ${{ secrets.CARGO_REGISTRY_TOKEN }} |