Only codesign on windows #34
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: Publish Analog SDK | |
on: | |
push: | |
tags: | |
- v[0-9]+.[0-9]+.[0-9]+ | |
jobs: | |
release: | |
strategy: | |
matrix: | |
include: | |
- os: macos-latest | |
target: x86_64-apple-darwin | |
- os: macos-latest | |
target: aarch64-apple-darwin | |
- os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
- os: win-signing | |
target: x86_64-pc-windows-msvc | |
runs-on: ${{ matrix.os }} | |
env: | |
TARGET: ${{ matrix.target }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Setup Build Environment | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
sudo apt update | |
sudo apt install libudev-dev libhidapi-dev | |
- name: Setup rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
override: true | |
default: true | |
target: ${{ matrix.target }} | |
- uses: davidB/rust-cargo-make@v1 | |
- uses: Swatinem/rust-cache@v1 | |
with: | |
sharedKey: ${{ matrix.target }} | |
- name: Run deploy script | |
shell: bash | |
# Signing key env is required for signing dll's on windows | |
env: | |
TIMESTAMP: ${{secrets.WIN_EV_CSC_TIMESTAMP}} | |
CERT_FILE: ${{secrets.WIN_EV_CSC_CERT_FILE}} | |
CRYPT_PROVIDER: ${{secrets.WIN_EV_CSC_CRYPT_PROVIDER}} | |
READER: ${{secrets.WIN_EV_CSC_READER}} | |
PASS: ${{secrets.WIN_EV_CSC_PASS}} | |
CONTAINER: ${{secrets.WIN_EV_CSC_CONTAINER}} | |
run: sh ci/before_deploy.sh | |
- name: Build Windows Installer | |
shell: bash | |
if: runner.os == 'Windows' | |
env: | |
TIMESTAMP: ${{secrets.WIN_EV_CSC_TIMESTAMP}} | |
CERT_FILE: ${{secrets.WIN_EV_CSC_CERT_FILE}} | |
CRYPT_PROVIDER: ${{secrets.WIN_EV_CSC_CRYPT_PROVIDER}} | |
READER: ${{secrets.WIN_EV_CSC_READER}} | |
PASS: ${{secrets.WIN_EV_CSC_PASS}} | |
CONTAINER: ${{secrets.WIN_EV_CSC_CONTAINER}} | |
run: cargo make --cwd wooting-analog-sdk sign-win-installer -- --target $TARGET | |
- name: Build debian package | |
if: startsWith(matrix.os, 'ubuntu') | |
run: cargo make --cwd wooting-analog-sdk build-deb -- --target $TARGET | |
- name: Upload artifacts to release | |
uses: softprops/action-gh-release@v1 | |
with: | |
draft: true | |
files: | | |
target/wix/*.msi | |
target/debian/*.deb | |
*.tar.gz |