Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
250 changes: 37 additions & 213 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,223 +1,47 @@
name: Build & Release
name: Release
run-name: Release ${{ inputs.bump }} for ${{ github.event.repository.name }}

# Dispatch-driven release. Run from the Actions tab, pick patch / minor / major,
# and the shared reusable workflow handles the rest: bump the version across all
# files, generate the changelog, commit + tag on main, and build & upload signed
# macOS (universal, with the embedded WidgetKit extension) / Windows / Linux
# artifacts. See NoiXdev/github-workflows for the reusable workflow.

on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:
inputs:
tag:
description: 'Release tag (e.g. v1.0.0) — must already exist'
bump:
description: "Version bump"
required: true
type: choice
options:
- patch
- minor
- major
prerelease:
description: "Mark as a pre-release"
type: boolean
default: false
dry_run:
description: "Build everything but skip commit, tag, release and uploads"
type: boolean
default: false

concurrency:
group: release
cancel-in-progress: false

permissions:
contents: write

jobs:
changelog:
name: Generate changelog & create release
runs-on: ubuntu-latest
outputs:
release_id: ${{ steps.release.outputs.id }}
steps:
- uses: actions/checkout@v4
with:
# Full history + tags are required for conventional-changelog.
fetch-depth: 0
# Releases land on main: the CHANGELOG commit is pushed back here.
ref: main

- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- name: Install dependencies
# --ignore-scripts: this job never builds the Tauri app, just the changelog.
run: npm ci --ignore-scripts

- name: Sync all version fields to release tag
# Set the version everywhere (package.json, tauri.conf.json, Cargo.toml,
# lockfiles) so the release is fully tag-driven — no hand-editing — and
# every platform's artifacts match. conventional-changelog also reads
# package.json for the newest section's label.
run: |
TAG='${{ github.event.inputs.tag || github.ref_name }}'
bash scripts/set-version.sh "${TAG#v}"

- name: Generate full CHANGELOG.md
run: |
npm run changelog
# conventional-changelog can prepend blank lines; drop leading blanks
# so the file always starts at the first version heading.
sed -i '/./,$!d' CHANGELOG.md

- name: Extract latest release notes
run: awk '/^#{1,3} \[?v?[0-9]+\.[0-9]+/{c++} c==1' CHANGELOG.md > RELEASE_NOTES.md

- name: Commit version + CHANGELOG back to main
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add package.json package-lock.json \
src-tauri/tauri.conf.json src-tauri/Cargo.toml src-tauri/Cargo.lock CHANGELOG.md
if git diff --cached --quiet; then
echo 'Version and CHANGELOG.md unchanged — nothing to commit.'
else
git commit -m "chore(release): ${{ github.event.inputs.tag || github.ref_name }} [skip ci]"
git push origin HEAD:main
fi

- name: Create GitHub Release
id: release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.tag || github.ref_name }}
body_path: RELEASE_NOTES.md

# Windows + Linux build straight from tauri-action. macOS is handled by the
# dedicated build-macos job below, because it has to embed and inside-out-sign
# the WidgetKit extension, which tauri-action's one-shot signing can't do.
build:
name: Build – ${{ matrix.name }}
needs: changelog
strategy:
fail-fast: false
matrix:
include:
- name: Windows x64
os: windows-latest
- name: Linux x64
os: ubuntu-22.04

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Cache Rust build
uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri

- name: Install Tauri system dependencies (Linux)
if: matrix.os == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
libgtk-3-dev \
libssl-dev \
libxdo-dev \
patchelf \
build-essential \
file

- name: Install dependencies
run: npm ci

- name: Sync all version fields to release tag
shell: bash
run: |
TAG='${{ github.event.inputs.tag || github.ref_name }}'
bash scripts/set-version.sh "${TAG#v}"

- name: Build & upload (tauri-action)
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
releaseId: ${{ needs.changelog.outputs.release_id }}

build-macos:
name: Build – macOS (Universal)
needs: changelog
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-darwin,x86_64-apple-darwin

- name: Cache Rust build
uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri

- name: Install dependencies
run: npm ci

- name: Sync all version fields to release tag
run: |
TAG='${{ github.event.inputs.tag || github.ref_name }}'
bash scripts/set-version.sh "${TAG#v}"

- name: Set up code signing
# Import the Developer ID cert into a dedicated keychain, derive the
# signing identity, and stage the notarization key. Skipped when the
# signing secrets are absent (e.g. a fork); the build then runs unsigned.
# See docs/macos-signing.md.
if: env.MACOS_CERTIFICATE != ''
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
APPLE_API_KEY_B64: ${{ secrets.APPLE_API_KEY }}
run: |
set -euo pipefail
CERT_PATH="$RUNNER_TEMP/cert.p12"
KEYCHAIN="$RUNNER_TEMP/signing.keychain-db"
KEYCHAIN_PWD="$(openssl rand -base64 24)"
echo "$MACOS_CERTIFICATE" | base64 --decode > "$CERT_PATH"
security create-keychain -p "$KEYCHAIN_PWD" "$KEYCHAIN"
security set-keychain-settings -lut 21600 "$KEYCHAIN"
security unlock-keychain -p "$KEYCHAIN_PWD" "$KEYCHAIN"
security import "$CERT_PATH" -k "$KEYCHAIN" -P "$MACOS_CERTIFICATE_PASSWORD" -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PWD" "$KEYCHAIN" >/dev/null
security list-keychains -d user -s "$KEYCHAIN" $(security list-keychains -d user | sed s/\"//g)
IDENTITY=$(security find-identity -v -p codesigning "$KEYCHAIN" | awk -F'"' '/Developer ID Application/{print $2; exit}')
echo "APPLE_SIGNING_IDENTITY=$IDENTITY" >> "$GITHUB_ENV"
KEY_PATH="$RUNNER_TEMP/apple_api_key.p8"
echo "$APPLE_API_KEY_B64" | base64 --decode > "$KEY_PATH"
echo "APPLE_API_KEY_PATH=$KEY_PATH" >> "$GITHUB_ENV"
rm -f "$CERT_PATH"

- name: Build, embed widget, sign, notarize & package
env:
# APPLE_SIGNING_IDENTITY and APPLE_API_KEY_PATH come from $GITHUB_ENV
# (set by the signing step); these two are the remaining notary inputs.
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
run: |
TAG='${{ github.event.inputs.tag || github.ref_name }}'
export VERSION="${TAG#v}"
bash scripts/macos-release.sh

- name: Upload macOS artifact to release
env:
GH_TOKEN: ${{ github.token }}
run: |
TAG='${{ github.event.inputs.tag || github.ref_name }}'
VERSION="${TAG#v}"
gh release upload "$TAG" \
"src-tauri/target/universal-apple-darwin/release/bundle/macos/Notefix_${VERSION}_universal.dmg" \
--clobber --repo "${{ github.repository }}"

- name: Clean up notarization key
if: always()
run: rm -f "$RUNNER_TEMP/apple_api_key.p8"
release:
uses: NoiXdev/github-workflows/.github/workflows/create_tauri_changelog_version_release.yaml@main
secrets: inherit
with:
bump: ${{ inputs.bump }}
prerelease: ${{ inputs.prerelease }}
dry_run: ${{ inputs.dry_run }}
# Builds the universal app, embeds + inside-out-signs the WidgetKit
# extension, notarizes, and prints DMG=<path> for upload.
macos_build_script: scripts/macos-release.sh
29 changes: 0 additions & 29 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,3 @@
## [0.2.0](https://github.com/NoiXdev/notefix/compare/v0.1.2...v0.2.0) (2026-07-01)

### Features

* context-switch hotkeys and check-for-updates ([cacfb9f](https://github.com/NoiXdev/notefix/commit/cacfb9f580e33df2f4a98c379504f2e33d0ac54a))
* Konfetti-Easter-Egg bei Mittelklick ([9550773](https://github.com/NoiXdev/notefix/commit/95507737a64ee534a93c40bd0a829ea56521360a))
* Lade-Overlay beim Öffnen sehr großer Notizen ([1a6553a](https://github.com/NoiXdev/notefix/commit/1a6553a91442772c65239eebb59bc6954ae19504))
* lazy per-note loading — meta list, on-demand content, SQL search ([62216ea](https://github.com/NoiXdev/notefix/commit/62216ea581948970236934a38b821cd53a69d3ed))
* Notiz-Suche (Cmd+P) und In-Notiz-Suche (Cmd+F) ([3fe2e9c](https://github.com/NoiXdev/notefix/commit/3fe2e9c8fd1202db2a196904adc88edcae9430ea))
* **rust:** lazy note loading — NoteMeta list, load-one, SQL search ([d1d629b](https://github.com/NoiXdev/notefix/commit/d1d629b5f9de933691e70bbff029938e53e5ba37))

### Bug Fixes

* Such-Icon in Einzelkontext-Sidebar sichtbar + FindBar-Bedienung ([4a2fc35](https://github.com/NoiXdev/notefix/commit/4a2fc353290e59db9fb7f58a343322bfb0e2c67f))

### Styling

* **src-tauri:** rustfmt storage.rs and update.rs ([f52aa18](https://github.com/NoiXdev/notefix/commit/f52aa188de100cb383ef9194c1d08e87120c3b88))

### CI/CD

* make releases fully tag-driven across all version fields ([f8c1183](https://github.com/NoiXdev/notefix/commit/f8c11839df33a32a9162768b5b993fe00ee462c5))

## [0.1.2](https://github.com/NoiXdev/notefix/compare/v0.1.1...v0.1.2) (2026-07-01)

### Build System

* **widget:** sync widget version to the app version ([4d5d4b1](https://github.com/NoiXdev/notefix/commit/4d5d4b18c6e5995f63f0a018e37872d33c8e2a79))

## [0.1.1](https://github.com/NoiXdev/notefix/compare/v0.1.0...v0.1.1) (2026-06-30)

### CI/CD
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "notefix",
"private": true,
"version": "0.2.0",
"version": "0.1.2",
"description": "A lightweight, local-first sticky-note desktop app built with Tauri.",
"license": "MIT",
"author": "noix.dev",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "notefix"
version = "0.2.0"
version = "0.1.2"
description = "Notefix — a lightweight sticky-note desktop app"
authors = ["noix.dev"]
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Notefix",
"version": "0.2.0",
"version": "0.1.2",
"identifier": "dev.noix.notefix",
"build": {
"beforeDevCommand": "npm run dev",
Expand Down
Loading