feat: make it easier to use Maudit as a library (#37) #26
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 / Publish | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| publish: | |
| # Run only when a Release PR was merged into main | |
| if: > | |
| contains(github.event.head_commit.message, 'chore(release): bump versions and changelogs') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Publish crates (tag + publish) | |
| uses: bruits/sampo/crates/sampo-github-action@main | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| command: post-merge-publish | |
| cargo-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| create-github-release: true | |
| release_pr: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Open/refresh Release PR | |
| uses: bruits/sampo/crates/sampo-github-action@main | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| command: prepare-pr |