build: Add key import to sign releases #10
Workflow file for this run
This file contains 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: Bump version | |
on: | |
push: | |
branches: | |
- main | |
- add-signing-key | |
jobs: | |
bump-version: | |
if: "!startsWith(github.event.head_commit.message, 'bump:')" | |
runs-on: ubuntu-latest | |
environment: release | |
steps: | |
- name: Check out | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
fetch-depth: 0 | |
# Must include all files from pyproject.toml's tool.commitizen.version_files | |
sparse-checkout: | | |
pyproject.toml | |
podcast_archiver/__init__.py | |
README.md | |
CHANGELOG.md | |
sparse-checkout-cone-mode: false | |
- name: Import GPG key | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
git_tag_gpgsign: true | |
fingerprint: 41E311388E4BB349 | |
- name: List keys | |
run: gpg -K | |
- run : 'echo testing > file.txt' | |
- run: git add file.txt | |
- run: git commit | |
- run: git show | |
- run: git verify-commit HEAD | |
# - name: Create bump and changelog | |
# uses: commitizen-tools/commitizen-action@master | |
# with: | |
# github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
# changelog_increment_filename: body.md | |
# - name: Create GitHub release | |
# uses: ncipollo/release-action@v1 | |
# with: | |
# tag: v${{ env.REVISION }} | |
# bodyFile: "body.md" | |
# skipIfReleaseExists: true |