Skip to content

chore: release v0.7.12 #58

chore: release v0.7.12

chore: release v0.7.12 #58

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
release:
runs-on: macos-latest
env:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-darwin,x86_64-apple-darwin
- name: Install Node 22
uses: actions/setup-node@v6
with:
node-version: 22
- name: Install pnpm
uses: pnpm/action-setup@v6
with:
run_install: false
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Generate DMG background
run: node scripts/make-dmg-bg.js
- name: Build universal macOS app
run: pnpm tauri build --target universal-apple-darwin
- name: Prepare release assets
run: |
VERSION="${GITHUB_REF_NAME#v}"
DMG_NAME="NodeNet_${VERSION}_universal.dmg"
DMG_PATH="src-tauri/target/universal-apple-darwin/release/bundle/dmg/${DMG_NAME}"
UPDATE_NAME="NodeNet.app.tar.gz"
UPDATE_PATH="src-tauri/target/universal-apple-darwin/release/bundle/macos/${UPDATE_NAME}"
SIG_PATH="${UPDATE_PATH}.sig"
PUB_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
if [ ! -f "${DMG_PATH}" ]; then
echo "ERROR: DMG not found at ${DMG_PATH}"
find src-tauri/target/universal-apple-darwin/release/bundle -type f || true
exit 1
fi
if [ ! -f "${UPDATE_PATH}" ]; then
echo "ERROR: Updater artifact not found at ${UPDATE_PATH}"
find src-tauri/target/universal-apple-darwin/release/bundle -type f || true
exit 1
fi
if [ ! -f "${SIG_PATH}" ]; then
echo "ERROR: Updater signature not found at ${SIG_PATH}"
find src-tauri/target/universal-apple-darwin/release/bundle -type f || true
exit 1
fi
cp "${DMG_PATH}" "${DMG_NAME}"
cp "${UPDATE_PATH}" "${UPDATE_NAME}"
SIGNATURE=$(cat "${SIG_PATH}")
UPDATE_URL="https://github.com/DarkDo11/NodeNet/releases/download/v${VERSION}/${UPDATE_NAME}"
cat > latest.json << EOF
{
"version": "v${VERSION}",
"notes": "NodeNet v${VERSION}",
"pub_date": "${PUB_DATE}",
"platforms": {
"darwin-x86_64": {
"url": "${UPDATE_URL}",
"signature": "${SIGNATURE}"
},
"darwin-aarch64": {
"url": "${UPDATE_URL}",
"signature": "${SIGNATURE}"
}
}
}
EOF
echo "Generated latest.json:"
cat latest.json
- name: Publish GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
NodeNet_*_universal.dmg
NodeNet.app.tar.gz
latest.json