Release #41
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 | |
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-latest" | |
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 | |
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf | |
- name: Install OpenSSL (Windows only) | |
if: matrix.settings.platform == 'windows-latest' | |
run: | | |
choco install openssl --execution-timeout 7200 | |
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-3-x64.dll" .\src-tauri | |
copy "C:\Program Files\OpenSSL\bin\libssl-3-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.repos.getReleaseByTag({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
tag: `v${packageVersion}` | |
}); | |
return release.body; | |
- name: Create release | |
uses: tauri-apps/tauri-action@v0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_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 | |
token: "${{ secrets.SEMANTIC_RELEASE_PAT }}" |