v1.2.0-dev.13 #40
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: Release CI | |
on: | |
push: | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
workflow_dispatch: | |
jobs: | |
build-tauri: | |
permissions: | |
contents: write | |
strategy: | |
fail-fast: false | |
matrix: | |
# platform: [macos-latest, ubuntu-20.04, windows-latest] | |
platform: [macos-latest, windows-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Checkout original repository | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18 | |
- name: Install Rust stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Rust cache | |
uses: swatinem/rust-cache@v2 | |
with: | |
workspaces: './src-tauri -> target' | |
- name: install dependencies (ubuntu only) | |
if: matrix.platform == 'ubuntu-20.04' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf | |
- name: Get npm cache directory path | |
id: npm-cache-dir-path | |
run: echo "::set-output name=dir::$(npm config get cache)" | |
- name: Npm cache | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.npm-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm- | |
- name: Install app dependencies | |
run: npm install | |
- name: import windows certificate | |
if: matrix.platform == 'windows-latest' | |
env: | |
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }} | |
WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }} | |
run: | | |
New-Item -ItemType directory -Path certificate | |
Set-Content -Path certificate/tempCert.txt -Value $env:WINDOWS_CERTIFICATE | |
certutil -decode certificate/tempCert.txt certificate/certificate.pfx | |
Remove-Item -path certificate -include tempCert.txt | |
Import-PfxCertificate -FilePath certificate/certificate.pfx -CertStoreLocation Cert:\CurrentUser\My -Password (ConvertTo-SecureString -String $env:WINDOWS_CERTIFICATE_PASSWORD -Force -AsPlainText) | |
- uses: tauri-apps/tauri-action@v0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.PAT }} | |
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | |
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} | |
with: | |
tagName: v__VERSION__ | |
releaseName: 'BiliTools | v__VERSION__' | |
releaseBody: 'See the assets to download this version and install.' | |
releaseDraft: false | |
prerelease: false | |
includeUpdaterJson: false | |
- name: Init and deploy install.json | |
run: npm run updater | |
env: | |
GITHUB_TOKEN: ${{ secrets.PAT }} |