-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change: add possibility to make automated releases (#35)
- Loading branch information
1 parent
2030907
commit 7fecd68
Showing
3 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: patch release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-release: | ||
env: | ||
GITHUB_USER: ${{ secrets.GREENBONE_BOT }} | ||
GITHUB_MAIL: ${{ secrets.GREENBONE_BOT_MAIL }} | ||
GITHUB_TOKEN: ${{ secrets.GREENBONE_BOT_TOKEN }} | ||
GPG_KEY: ${{ secrets.GPG_KEY }} | ||
GPG_FINGERPRINT: ${{ secrets.GPG_FINGERPRINT }} | ||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | ||
name: Build and release with pontos | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
- name: Install pontos | ||
run: | | ||
apt-get update && apt-get --assume-yes install python3-venv | ||
python3 -m venv .venv | ||
. .venv/bin/activate | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade pontos | ||
- name: Tell git who I am | ||
run: | | ||
git config --global user.name "${{ env.GITHUB_USER }}" | ||
git config --global user.email "${{ env.GITHUB_MAIL }}" | ||
git remote set-url origin https://${{ env.GITHUB_TOKEN }}@github.com/${{ github.repository }} | ||
- name: Print base branch | ||
# we always should've checked out the correct branch' | ||
run: echo "Current Branch is $GITHUB_BASE_REF" | ||
- name: Prepare patch release with pontos | ||
run: | | ||
. .venv/bin/activate | ||
pontos-release prepare --patch | ||
echo "VERSION=$(pontos-version show)" >> $GITHUB_ENV | ||
- name: Release with pontos | ||
run: | | ||
. .venv/bin/activate | ||
pontos-release release | ||
- name: Import key from secrets | ||
run: | | ||
echo -e "${{ env.GPG_KEY }}" >> tmp.file | ||
gpg \ | ||
--pinentry-mode loopback \ | ||
--passphrase ${{ env.GPG_PASSPHRASE }} \ | ||
--import tmp.file | ||
rm tmp.file | ||
- name: Sign with pontos-release sign | ||
run: | | ||
echo "Signing assets for ${{env.VERSION}}" | ||
. .venv/bin/activate | ||
pontos-release sign \ | ||
--signing-key ${{ env.GPG_FINGERPRINT }} \ | ||
--passphrase ${{ env.GPG_PASSPHRASE }} \ | ||
--release-version ${{ env.VERSION }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,3 +50,5 @@ modules.order | |
Module.symvers | ||
Mkfile.old | ||
dkms.conf | ||
build/ | ||
.release.md |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commit_types = [ | ||
{ message = "^add", group = "Added"}, | ||
{ message = "^remove", group = "Removed"}, | ||
{ message = "^change", group = "Changed"}, | ||
{ message = "^fix", group = "Bug Fixes"}, | ||
] | ||
|
||
changelog_dir = "changelog" |