Release Crate #28
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 Crate | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| level: | |
| description: "Release level (patch, minor, major)" | |
| required: true | |
| default: patch | |
| type: choice | |
| options: | |
| - patch | |
| - minor | |
| - major | |
| jobs: | |
| release: | |
| name: Cargo Release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # for pushing tags/commits | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| with: | |
| token: ${{ secrets.GH_PAT }} | |
| fetch-depth: 0 # required for tagging and changelog | |
| - name: Setup Git identity | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Install cargo-release | |
| run: cargo install cargo-release | |
| - name: Install git-cliff | |
| run: cargo install git-cliff | |
| - name: Run cargo-release | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| run: | | |
| cargo release ${{ github.event.inputs.level }} --execute --no-confirm |