chore: release v0.2.0 #3
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 changelog | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| concurrency: | |
| group: release-${{ github.ref }} | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.14 | |
| - name: Create GitHub Release and changelog | |
| run: bunx changelogithub | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Add Docker image link | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| release_body="$(gh release view "$GITHUB_REF_NAME" --json body --jq .body)" | |
| repository_name="${GITHUB_REPOSITORY#*/}" | |
| package_url="https://github.com/$GITHUB_REPOSITORY/pkgs/container/$repository_name" | |
| image="ghcr.io/${GITHUB_REPOSITORY,,}:${GITHUB_REF_NAME#v}" | |
| footer=$'\n\n<!-- docker-image -->\n### Docker\n\n' | |
| footer+="[View this Docker image]($package_url)"$'\n\n' | |
| footer+="<code>docker pull $image</code>" | |
| if [[ "$release_body" != *"<!-- docker-image -->"* ]]; then | |
| gh release edit "$GITHUB_REF_NAME" --notes "${release_body}${footer}" | |
| fi | |
| deploy: | |
| needs: release | |
| uses: ./.github/workflows/deploy.yml | |
| secrets: inherit |