Skip to content

fix: remove Ctrl+W ClosePane binding to avoid shell conflict #41

fix: remove Ctrl+W ClosePane binding to avoid shell conflict

fix: remove Ctrl+W ClosePane binding to avoid shell conflict #41

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
tag_name:
description: Git tag to release, for example v0.1.0
required: true
type: string
draft:
description: Create the GitHub release as a draft
required: true
default: true
type: boolean
prerelease:
description: Mark the release as a prerelease
required: true
default: false
type: boolean
permissions:
contents: write
concurrency:
group: release-${{ github.event_name == 'workflow_dispatch' && inputs.tag_name || github.ref_name }}
cancel-in-progress: false
jobs:
publish-tauri:
name: Publish (${{ matrix.bundle }})
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
include:
- bundle: macos-apple-silicon
platform: macos-latest
args: --target aarch64-apple-darwin
- bundle: macos-intel
platform: macos-latest
args: --target x86_64-apple-darwin
- bundle: linux
platform: ubuntu-22.04
args: ""
- bundle: windows
platform: windows-latest
args: ""
env:
TAG_NAME: ${{ github.event_name == 'workflow_dispatch' && inputs.tag_name || github.ref_name }}
RELEASE_DRAFT: ${{ github.event_name == 'workflow_dispatch' && inputs.draft || false }}
RELEASE_PRERELEASE: ${{ github.event_name == 'workflow_dispatch' && inputs.prerelease || false }}
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 20
cache: npm
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ startsWith(matrix.platform, 'macos') && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- name: Install Linux system dependencies
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Install frontend dependencies
run: npm ci
- name: Bump version from tag
shell: bash
run: |
VERSION="${TAG_NAME#v}"
jq --arg v "$VERSION" '.version = $v' package.json > tmp.json && mv tmp.json package.json
jq --arg v "$VERSION" '.version = $v' src-tauri/tauri.conf.json > tmp.json && mv tmp.json src-tauri/tauri.conf.json
python3 -c "
import re
path = 'src-tauri/Cargo.toml'
content = open(path).read()
content = re.sub(r'^version = \".*?\"', 'version = \"$VERSION\"', content, count=1, flags=re.MULTILINE)
open(path, 'w').write(content)
"
- name: Build and publish Tauri bundle
uses: tauri-apps/tauri-action@v0.6.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# macOS code signing and notarization
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: ${{ env.TAG_NAME }}
releaseName: ${{ format('fluxtty {0}', env.TAG_NAME) }}
releaseCommitish: ${{ github.sha }}
releaseDraft: ${{ env.RELEASE_DRAFT }}
prerelease: ${{ env.RELEASE_PRERELEASE }}
generateReleaseNotes: true
args: ${{ matrix.args }}
update-homebrew-tap:
name: Update Homebrew tap
needs: publish-tauri
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || !fromJSON(inputs.draft) }}
env:
TAG_NAME: ${{ github.event_name == 'workflow_dispatch' && inputs.tag_name || github.ref_name }}
steps:
- name: Trigger homebrew-tap update
env:
GH_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
run: |
VERSION="${TAG_NAME#v}"
gh workflow run update-cask.yml \
--repo amoswzw/homebrew-tap \
--field version="$VERSION"