Skip to content

use checkout

use checkout #74

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}}
APPLE_CERT_KEY: ${{secrets.APPLE_CERT_KEY}}
APPLE_TEAM_ID: ${{secrets.APPLE_TEAM_ID}}
- name: Verify executable
run: ./percy --version
- name: Upload win artifact
uses: actions/upload-artifact@v4
with:
name: win-exe
path: percy.exe
# - name: Upload app icon
# uses: actions/upload-artifact@v4
# with:
# name: percy.ico
# path: ./scripts/files/percy.ico
# - 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:
- uses: actions/checkout@v1
# - name: Download win artifact
# uses: actions/download-artifact@v4
# with:
# name: percy.ico
- name: Download app icon artifact
uses: actions/download-artifact@v4
with:
name: win-exe
- name: Download rcedit
run: |
Invoke-WebRequest -Uri https://github.com/electron/rcedit/releases/download/v1.1.1/rcedit-x64.exe -OutFile rcedit.exe
- name: Edit metadata
run: |
./rcedit.exe "./percy.exe" --set-version-string CompanyName "BrowserStack Inc." --set-version-string FileDescription "Percy CLI Binary" --set-version-string InternalName "Percy CLI" --set-version-string LegalCopyright "Copyright BrowserStack Limited" --set-version-string OriginalFilename "Percy CLI" --set-version-string ProductName "Percy CLI" --set-version-string ProductVersion "1.28.8" --set-version-string BinaryVersion "1.28.8" --set-file-version "1.28.8" --set-icon "./scripts/files/percy.ico"
- 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 win artifact
uses: actions/upload-artifact@v4
with:
name: percy.exe
path: percy.exe
# - run: |
# powershell -Command "Compress-Archive -Path 'percy.exe' -DestinationPath 'percy-win.zip'"
# - name: Upload assets
# uses: softprops/action-gh-release@d99959edae48b5ffffd7b00da66dcdb0a33a52ee
# with:
# files: |
# percy-win.zip
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}