chore: fix publishing & Knope-release of new "build" crate. #72
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: | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| inputs: | |
| type: | |
| description: Bump versions and trigger a new release. | |
| type: choice | |
| required: true | |
| default: prerelease | |
| options: | |
| - release | |
| - prerelease | |
| - dry-run | |
| jobs: | |
| prepare-release: | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.PAT }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Configure Git | |
| run: | | |
| git config --global user.name "${{ github.triggering_actor }}" | |
| git config --global user.email "${{ github.triggering_actor}}@users.noreply.github.com" | |
| - name: Install Knope | |
| uses: knope-dev/action@v2.1.2 | |
| with: | |
| version: 0.23.0 | |
| - name: Dry-run Release | |
| run: knope release --verbose --dry-run | |
| if: ${{ github.event_name == 'pull_request' || ( github.event_name == 'workflow_dispatch' && github.event.inputs.type == 'dry-run' ) }} | |
| - name: Prepare Pre-release | |
| run: knope release --verbose --prerelease-label=rc | |
| if: github.event_name == 'workflow_dispatch' && inputs.type == 'prerelease' | |
| - name: Prepare Release | |
| run: knope release --verbose | |
| if: github.event_name == 'workflow_dispatch' && inputs.type == 'release' | |
| - name: Trigger Publish | |
| run: gh workflow run publish.yml --ref main | |
| if: github.event_name == 'workflow_dispatch' && inputs.type != 'dry-run' | |
| env: | |
| GH_TOKEN: ${{ secrets.PAT }} | |