Skip to content

Merge pull request #263 from sylveon/artifact-signing #84

Merge pull request #263 from sylveon/artifact-signing

Merge pull request #263 from sylveon/artifact-signing #84

name: Publish Windows Bundle
on:
push:
branches:
- master
tags:
- v*
permissions:
contents: read
id-token: write
jobs:
build:
runs-on: windows-latest
environment: azuresigning
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup NodeJS
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Setup Env
run: |
npm i
npm i -g nexe@4.0.0-rc.7
- name: Retrieve the metadata and decode it to a file
env:
AZURESIGNING_METADATA: ${{ secrets.AZURESIGNING_METADATA }}
run: |
echo $AZURESIGNING_METADATA | base64 --decode > "$RUNNER_TEMP\metadata.json"
shell: bash
- name: Azure login
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Build bundle
run: |
npm run winbundle -- --signtool-path "C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\signtool.exe" --azure-signing-metadata "%RUNNER_TEMP%\metadata.json"
shell: cmd
- name: Upload Bundle File
uses: actions/upload-artifact@v4
with:
name: Bundle
path: dist\*.zip
- name: Upload Bundle to Release
uses: svenstaro/upload-release-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*.zip
file_glob: true
tag: ${{ github.ref }}
overwrite: true