Skip to content

Commit f86dab6

Browse files
committed
Correctly format github release. Update README for releasing
1 parent d6065e8 commit f86dab6

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,16 @@ jobs:
7878
id-token: write # IMPORTANT: mandatory for sigstore
7979

8080
steps:
81+
- name: Check out the repository
82+
uses: actions/checkout@v4
83+
with:
84+
fetch-depth: 0 # Fetch all tags and history
85+
- name: Get tag annotation
86+
id: tag_annotation
87+
run: |
88+
# Extract the tag annotation for release notes
89+
tag_annotation=$(git for-each-ref --format '%(contents:body)' refs/tags/${{ github.ref_name }})
90+
echo "annotation=$tag_annotation" >> $GITHUB_ENV
8191
- name: Download all the dists
8292
uses: actions/download-artifact@v4
8393
with:
@@ -96,7 +106,8 @@ jobs:
96106
gh release create
97107
'${{ github.ref_name }}'
98108
--repo '${{ github.repository }}'
99-
--notes ""
109+
--title '${{ github.ref_name }}'
110+
--notes "${{ env.annotation }}"
100111
- name: Upload artifact signatures to GitHub Release
101112
env:
102113
GITHUB_TOKEN: ${{ github.token }}

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ To run tests in a venv: `make test`
8181
- Using `nix`:
8282
- `nix develop`: Provides development shell/venv with all dependencies.
8383
- `make test` and `hatch build/publish` work as usual.
84+
- GitHub Action will upload to TestPyPi on each push to `main`. To create a
85+
GitHub and PyPi release, create a new tag (formatting below) and push tags.
86+
87+
<tag name on first line>
88+
89+
* Release note 1
90+
* Release note 2
91+
* ...
8492

8593
[1]: https://github.com/pschmitt/pykeepass "Pykeepass"
8694
[2]: https://davedavenport.github.io/rofi/ "Rofi"

0 commit comments

Comments
 (0)