Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Matte22 committed Feb 24, 2024
1 parent d27c813 commit 32e44e8
Showing 1 changed file with 30 additions and 9 deletions.
39 changes: 30 additions & 9 deletions .github/workflows/build-binary-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,39 +16,60 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Script Dependencies
run: |
sudo apt-get update
sudo apt-get install -y jq zip tar gpg
npm install -g pkg
id: install_script_dependencies
run: npm install -g pkg

- name: Check out the repo
uses: actions/checkout@v3
with:
ref: build-workflow
fetch-depth: 0

- name: Import GPG Key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@111c56156bcc6918c056dbef52164cfa583dc549
with:
gpg_private_key: ${{ secrets.WATCHER_PRIVATE_KEY }}

- name: run build script and sign
id: run-build-script-and-sign
run: ./build.sh --sign
id: run_build_script_and_sign
run: ./build.sh
continue-on-error: false

- name: Upload Artifacts
if: always()
uses: actions/upload-artifact@v3
with:
name: binary-artifacts
path: |
./dist/
if-no-files-found: error

- name: Import GPG Public Key
id: import_gpg_public
if: always() && steps.run_build_script_and_sign.outcome == 'success'
run: gpg --import ./stigman-watcher-publickey.gpg.asc

- name: Get version from package.json
id: package_version
if: always() && steps.run_build_script_and_sign.outcome == 'success'
run: echo "PACKAGE_VERSION=$(jq -r '.version' package.json)" >> $GITHUB_ENV

- name: Verify Signature for Linux
id: verify_signature_linux
if: always() && steps.run_build_script_and_sign.outcome == 'success'
working-directory: ./dist
run: gpg --verify stigman-watcher-linux-${{ env.PACKAGE_VERSION }}.tar.gz.asc stigman-watcher-linux-${{ env.PACKAGE_VERSION }}.tar.gz
run: |
if ! gpg --verify stigman-watcher-linux-${{ env.PACKAGE_VERSION }}.tar.gz.asc stigman-watcher-linux-${{ env.PACKAGE_VERSION }}.tar.gz; then
echo "::warning ::Signature verification for Linux failed"
fi
- name: Verify Signature for Windows
id: verify_signature_windows
if: always() && steps.run_build_script_and_sign.outcome == 'success'
working-directory: ./dist
run: gpg --verify stigman-watcher-win-${{ env.PACKAGE_VERSION }}.zip.asc stigman-watcher-win-${{ env.PACKAGE_VERSION }}.zip

run: |
if ! gpg --verify stigman-watcher-win-${{ env.PACKAGE_VERSION }}.zip.asc stigman-watcher-win-${{ env.PACKAGE_VERSION }}.zip; then
echo "::warning ::Signature verification for Windows failed"
fi

0 comments on commit 32e44e8

Please sign in to comment.