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: Build Binary Artifacts | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- build-workflow | |
paths: | |
- 'lib/**' | |
- 'index.js' | |
- 'build.sh' | |
- '.github/workflows/build-binary-artifacts.yml' | |
jobs: | |
build-binary-artifacts-and-sign: | |
name: Build binary artifacts, sign, export | |
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 | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
fetch-depth: 0 | |
- name: list files | |
run: ls -la | |
- name: run ls in lib folder | |
run: ls -la lib | |
- 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 | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: binary-artifacts | |
path: | | |
./dist/ | |
if-no-files-found: error | |
- name: cat test file | |
run: cat ./testfile.txt | |
- name: cat key file | |
run: cat ./stigman-watcher-publickey.gpg.asc | |
- name: Import GPG Public Key | |
run: gpg --import ./stigman-watcher-publickey.gpg.asc | |
- name: Get version from package.json | |
id: package_version | |
run: echo "PACKAGE_VERSION=$(jq -r '.version' package.json)" >> $GITHUB_ENV | |
- name: Verify Signature for Linux | |
run: gpg --verify stigman-watcher-linux-${{ env.PACKAGE_VERSION }}.tar.gz.asc stigman-watcher-linux-${{ env.PACKAGE_VERSION }}.tar.gz | |
- name: Verify Signature for Windows | |
run: gpg --verify stigman-watcher-win-${{ env.PACKAGE_VERSION }}.zip.asc stigman-watcher-win-${{ env.PACKAGE_VERSION }}.zip | |