From f86dab61b26e37617f10f1af151443e9350dbf5d Mon Sep 17 00:00:00 2001 From: Scott Hansen Date: Fri, 22 Nov 2024 10:39:59 -0800 Subject: [PATCH] Correctly format github release. Update README for releasing --- .github/workflows/main.yml | 13 ++++++++++++- README.md | 8 ++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2859a7a..58bf9b1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -78,6 +78,16 @@ jobs: id-token: write # IMPORTANT: mandatory for sigstore steps: + - name: Check out the repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Fetch all tags and history + - name: Get tag annotation + id: tag_annotation + run: | + # Extract the tag annotation for release notes + tag_annotation=$(git for-each-ref --format '%(contents:body)' refs/tags/${{ github.ref_name }}) + echo "annotation=$tag_annotation" >> $GITHUB_ENV - name: Download all the dists uses: actions/download-artifact@v4 with: @@ -96,7 +106,8 @@ jobs: gh release create '${{ github.ref_name }}' --repo '${{ github.repository }}' - --notes "" + --title '${{ github.ref_name }}' + --notes "${{ env.annotation }}" - name: Upload artifact signatures to GitHub Release env: GITHUB_TOKEN: ${{ github.token }} diff --git a/README.md b/README.md index ac4f53f..8b189d6 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,14 @@ To run tests in a venv: `make test` - Using `nix`: - `nix develop`: Provides development shell/venv with all dependencies. - `make test` and `hatch build/publish` work as usual. +- GitHub Action will upload to TestPyPi on each push to `main`. To create a + GitHub and PyPi release, create a new tag (formatting below) and push tags. + + + + * Release note 1 + * Release note 2 + * ... [1]: https://github.com/pschmitt/pykeepass "Pykeepass" [2]: https://davedavenport.github.io/rofi/ "Rofi"