Skip to content

Release

Release #4

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
inputs:
tag:
description: "Git tag to release (e.g. v0.1.1). Required for manual runs."
required: true
type: string
concurrency:
group: release-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
build-essential \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Normalize Release Please generated formatting
run: |
if ! grep -qxF "CHANGELOG.md" .prettierignore; then
printf "\n# Machine-generated by Release Please\nCHANGELOG.md\n" >> .prettierignore
fi
pnpm exec prettier \
package.json \
.release-please-manifest.json \
src-tauri/tauri.conf.json \
--write
- run: pnpm check
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
- run: cargo test
working-directory: src-tauri
- run: cargo fmt --all -- --check
working-directory: src-tauri
- run: cargo clippy --all-targets -- -D warnings
working-directory: src-tauri
release-macos:
needs: validate
permissions:
contents: write
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'workflow_dispatch' && format('refs/tags/{0}', inputs.tag) || github.ref }}
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
- name: Install Rust targets (universal macOS)
run: rustup target add aarch64-apple-darwin x86_64-apple-darwin
- run: pnpm install --frozen-lockfile
- name: Resolve release tag
id: release_tag
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
TAG="${{ inputs.tag }}"
else
TAG="${GITHUB_REF#refs/tags/}"
fi
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
# codesign/AMFI rejects `<true />`; plutil normalizes to `<true/>` (see Apple TN3125).
- name: Normalize entitlements for codesign
run: plutil -convert xml1 src-tauri/Entitlements.plist
- name: Build, sign, notarize, and publish
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
with:
tagName: ${{ steps.release_tag.outputs.tag }}
releaseName: Oxidock ${{ steps.release_tag.outputs.tag }}
releaseBody: |
Signed and notarized macOS build for Oxidock.
- Download the `.dmg` (recommended) or `.app.tar.gz` for your Mac.
- See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/${{ steps.release_tag.outputs.tag }}/CHANGELOG.md) for release notes.
**Landing page:** link to `https://github.com/${{ github.repository }}/releases/latest`
releaseDraft: false
prerelease: ${{ contains(steps.release_tag.outputs.tag, '-') }}
projectPath: src-tauri
args: --target universal-apple-darwin