chore: Release #6
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 QuickMark CLI | |
| on: | |
| push: | |
| tags: | |
| - 'quickmark-cli@*' | |
| jobs: | |
| publish: | |
| name: Publish to crates.io | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Install cargo tools | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-release,git-cliff | |
| - name: Publish quickmark-cli to crates.io | |
| run: cargo publish -p quickmark-cli --token ${{ secrets.CRATES_IO_TOKEN }} | |
| - name: Generate changelog | |
| id: changelog | |
| run: | | |
| changelog=$(./scripts/latest-changes.sh quickmark-cli) | |
| echo "content<<EOF" >> $GITHUB_OUTPUT | |
| echo "$changelog" >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| - name: Create GitHub release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| body: ${{ steps.changelog.outputs.content }} | |
| draft: false | |
| prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |