Skip to content

v1.24.1

v1.24.1 #48

Workflow file for this run

name: Release
on:
release:
types: [created]
workflow_dispatch:
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: true
jobs:
publish:
strategy:
fail-fast: false
matrix:
settings:
- platform: "macos-latest"
args: "--target aarch64-apple-darwin"
- platform: "macos-13" # Force x86_64 build on macOS 13, as the tauri github action uses process.arch to come up with the right signature filename
args: "--target x86_64-apple-darwin"
- platform: "ubuntu-latest"
args: ""
- platform: "windows-latest"
args: ""
runs-on: ${{ matrix.settings.platform }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: "npm"
- name: install dependencies (ubuntu only)
if: matrix.settings.platform == 'ubuntu-latest'
run: |
sudo apt-get update || true
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
- name: Set-up OpenSSL (Windows only)
if: matrix.settings.platform == 'windows-latest'
run: |
mkdir -p "C:\Program Files\OpenSSL\ca"
curl -o "C:\Program Files\OpenSSL\ca\cacert.pem" https://curl.se/ca/cacert.pem
copy "C:\Program Files\OpenSSL\bin\libcrypto-1_1-x64.dll" .\src-tauri
copy "C:\Program Files\OpenSSL\bin\libssl-1_1-x64.dll" .\src-tauri
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.settings.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: "./src-tauri -> target"
- name: Install dependencies
run: npm install
- name: Set Windows Env Vars
if: matrix.settings.platform == 'windows-latest'
run: |
echo "OPENSSL_DIR='C:\Program Files\OpenSSL'" >> $env:GITHUB_ENV
echo "SSL_CERT_FILE='C:\Program Files\OpenSSL\ca\cacert.pem'" >> $env:GITHUB_ENV
echo "OPENSSL_NO_VENDOR=1" >> $env:GITHUB_ENV
- name: Fetch release notes
uses: actions/github-script@v7
id: release_notes
with:
result-encoding: string
script: |
const packageVersion = require('./package.json').version;
const { data: release } = await github.rest.repos.getReleaseByTag({
owner: context.repo.owner,
repo: context.repo.repo,
tag: `v${packageVersion}`
});
return release.body;
- name: Write Private API key to file (OSX)
if: matrix.settings.platform == 'macos-latest' || matrix.settings.platform == 'macos-13'
run: |
echo "${{ secrets.APPLE_PRIVATE_API_KEY_CONTENTS }}" > $HOME/apple_private_api_key.p8
echo "APPLE_API_KEY_PATH=$HOME/apple_private_api_key.p8" >> $GITHUB_ENV
- name: Create release
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
with:
tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: "v__VERSION__"
releaseBody: "${{steps.release_notes.outputs.result}}"
releaseDraft: true
prerelease: false
tauriScript: ./node_modules/.bin/tauri
args: ${{ matrix.settings.args }}
publish_update_manifest:
needs: publish
runs-on: ubuntu-latest
steps:
- name: Invoke JET Pilot Docs deployment
uses: benc-uk/workflow-dispatch@v1
with:
workflow: deploy.yml
repo: unxsist/jet-pilot-docs
ref: main
token: "${{ secrets.SEMANTIC_RELEASE_PAT }}"