Skip to content

Commit

Permalink
Create a GitHub release on tag
Browse files Browse the repository at this point in the history
  • Loading branch information
twm committed Dec 4, 2024
1 parent b13ee8c commit 2cd0c9f
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: CI
on:
push:
branches: ["trunk"]
tags: ["v*"]
pull_request:
branches: ["trunk"]

Expand All @@ -24,6 +25,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- uses: actions/[email protected]
with:
Expand Down Expand Up @@ -52,6 +55,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: apt install
run: |
Expand All @@ -78,3 +83,28 @@ jobs:
name: dist
path: dist/*.*
if-no-files-found: error

release:
name: "release"
if: startsWith(github.ref, 'refs/tags/v')
needs: [build]

permissions:
contents: write

steps:

- uses: actions/download-artifact@v4
with:
name: dist
path: dist/

- run: |
gh release create "${TAG_REF:##*/}" \
--verify-tag \
--title "Yarrharr ${TAG_REF:##*/v}" \
--generate-notes \
dist/yarrharr-*.tar.gz \
dist/yarrharr-*.whl
environment:
TAG_REF: ${{ github.ref }}

0 comments on commit 2cd0c9f

Please sign in to comment.