Skip to content

Commit

Permalink
Add some action
Browse files Browse the repository at this point in the history
  • Loading branch information
jfinstrom committed Feb 29, 2024
1 parent ef0c675 commit f6500cb
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
39 changes: 39 additions & 0 deletions .github/workflows/signrelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Sign and Release Module

on:
push:
branches:
- 'release/*'

jobs:
sign_and_release_module:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install GPG
run: sudo apt-get update && sudo apt-get install gnupg -y

- name: Import GPG key
run: echo "${{ secrets.GPG_SIGNING_KEY }}" | base64 --decode | gpg --import

- name: Extract version and rawname from module.xml
run: |
version=$(awk -F'[><]' '/<version>/{print $3}' /location/of/module/module.xml)
rawname=$(awk -F'[><]' '/<rawname>/{print $3}' /location/of/module/module.xml)
echo "::set-env name=version::$version"
echo "::set-env name=rawname::$rawname"
- name: Sign module
run: |
gpg --batch --yes --armor --detach-sign /location/of/module/$rawname-$version.tar.gz
- name: Push signed module to releases
uses: softprops/action-gh-release@v1
with:
files: /location/of/module/$rawname-$version.tar.gz.asc
tag_name: v$version
title: Release $version
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
"intelephense.diagnostics.undefinedMethods": false,
"intelephense.diagnostics.undefinedProperties": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
}
}

0 comments on commit f6500cb

Please sign in to comment.