Release #50
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: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
create-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set output | |
id: vars | |
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Generate changelog | |
id: create_release | |
run: npx changelogithub --draft --name Duckling-${{ steps.vars.outputs.tag }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
publish: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- build: linux | |
os: ubuntu-latest | |
arch: x86_64 | |
target: x86_64-unknown-linux-gnu | |
- build: macos | |
os: macos-latest | |
arch: x86_64 | |
target: x86_64-apple-darwin | |
- buid: macos | |
os: macos-latest | |
arch: aarch64 | |
target: aarch64-apple-darwin | |
- build: windows | |
os: windows-latest | |
arch: x86_64 | |
target: x86_64-pc-windows-msvc | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- uses: pnpm/action-setup@v2 | |
name: Install pnpm | |
with: | |
version: 8 | |
run_install: false | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install | |
- name: install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
- name: Rust cache | |
uses: swatinem/rust-cache@v2 | |
with: | |
workspaces: './src-tauri -> target' | |
key: ${{ runner.os }} | |
- name: install webkit2gtk (ubuntu only) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev | |
- uses: tauri-apps/tauri-action@v0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | |
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} | |
with: | |
tagName: v__VERSION__ | |
releaseName: "Duckling v__VERSION__" | |
releaseBody: "See the assets to download this version and install." | |
releaseDraft: true | |
prerelease: false | |
releaseId: ${{ needs.create-release.outputs.release_id }} | |