Skip to content

Using action

Using action #62

Workflow file for this run

name: Build Executables
on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
name: Build Executables
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v4
with:
node-version: 14
architecture: x64
- run: ./scripts/executable.sh
env:
APPLE_DEV_CERT: ${{secrets.APPLE_DEV_CERT}}
APPLE_ID_USERNAME: ${{secrets.APPLE_ID_USERNAME}}
APPLE_ID_KEY: ${{secrets.APPLE_ID_KEY}}
- name: Verify executable
run: ./percy --version
- name: Upload win artifact
uses: actions/upload-artifact@v4
with:
name: win-exe
path: percy.exe
# - name: Upload assets
# uses: softprops/action-gh-release@d99959edae48b5ffffd7b00da66dcdb0a33a52ee
# with:
# files: |
# percy-osx.zip
# percy-linux.zip
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
notify:
needs: build
name: Sign Win Executable
runs-on: windows-latest
steps:
- name: Download a single artifact
uses: actions/download-artifact@v4
with:
name: win-exe
# - run: |
# echo ${{ secrets.WINDOWS_CERT }} | base64.exe -d > CodeSigning.p12
# signtool.exe sign /fd SHA256 /f CodeSigning.p12 /p "${{ secrets.WINDOWS_CERT_KEY }}" percy.exe
# powershell Compress-Archive -Path percy.exe -DestinationPath percy-win.zip
- name: Sign binary
uses: lando/code-sign-action@v2
with:
file: ./percy.exe
certificate-data: ${{ secrets.WINDOWS_CERT }}
certificate-password: ${{ secrets.WINDOWS_CERT_KEY }}
- name: Verify executable
run: ./percy.exe --version
# - name: Upload assets
# uses: softprops/action-gh-release@d99959edae48b5ffffd7b00da66dcdb0a33a52ee
# with:
# files: |
# percy-win.zip
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}