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
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Planer CI
on:
workflow_dispatch:
push:
branches: [develop, main]
branches: [develop]
pull_request:
branches: [develop, main]

Expand All @@ -24,6 +24,7 @@ jobs:
node-version: 22
cache: npm
- run: npm ci
- run: npm run check:version
- run: npm run lint
- run: npm run build

Expand All @@ -41,7 +42,7 @@ jobs:
- run: npm run tauri build
- uses: actions/upload-artifact@v4
with:
name: Planer-0.1.0-Windows
name: Planer-Windows-${{ github.sha }}
path: |
src-tauri/target/release/bundle/nsis/*.exe
src-tauri/target/release/bundle/msi/*.msi
Expand Down
89 changes: 89 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Publish Planer Release

on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: write

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

jobs:
quality:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
tag: ${{ steps.version.outputs.tag }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm run check:version
- run: npm run lint
- run: npm run build
- id: version
shell: bash
run: |
version=$(node -p "require('./package.json').version")
echo "version=$version" >> "$GITHUB_OUTPUT"
echo "tag=v$version" >> "$GITHUB_OUTPUT"

windows-installer:
runs-on: windows-latest
needs: quality
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- uses: dtolnay/rust-toolchain@stable
- run: npm ci
- run: npm run tauri build
- name: Collect release installers
shell: pwsh
run: |
New-Item -ItemType Directory -Path release-assets -Force | Out-Null
Copy-Item src-tauri/target/release/bundle/nsis/*.exe release-assets/
Copy-Item src-tauri/target/release/bundle/msi/*.msi release-assets/
- uses: actions/upload-artifact@v4
with:
name: Planer-${{ needs.quality.outputs.version }}-Windows
path: release-assets/*
if-no-files-found: error

publish:
runs-on: ubuntu-latest
needs: [quality, windows-installer]
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ needs.quality.outputs.tag }}
RELEASE_VERSION: ${{ needs.quality.outputs.version }}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: Planer-${{ needs.quality.outputs.version }}-Windows
path: release-assets
- name: Refuse duplicate release versions
shell: bash
run: |
if gh release view "$RELEASE_TAG" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
echo "Release $RELEASE_TAG already exists. Bump the version before publishing another installer."
exit 1
fi
- name: Publish GitHub Release
shell: bash
run: |
gh release create "$RELEASE_TAG" release-assets/* \
--repo "$GITHUB_REPOSITORY" \
--target "$GITHUB_SHA" \
--title "Planer $RELEASE_VERSION" \
--generate-notes
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ All notable changes to Planer are documented here.
- `.planer` and `.excalidraw` JSON exports.
- Windows CI workflow for lint, web build, and Tauri installer artifacts.
- Manual CI dispatch, concurrency protection, and repository governance documents.
- Automated version consistency validation across npm, Tauri, and Cargo metadata.
- GitHub Release publishing with attached Windows NSIS and MSI installers.

### Removed

Expand Down
Loading
Loading