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
42 changes: 34 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,23 @@ on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
tag:
description: "Existing git tag to release (e.g. v0.1.0)"
required: true
default: "v0.1.0"

permissions:
contents: write

jobs:
release-windows:
runs-on: windows-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'workflow_dispatch' && format('refs/tags/{0}', inputs.tag) || github.ref }}

- uses: actions/setup-node@v4
with:
Expand All @@ -27,19 +36,36 @@ jobs:
- run: npm ci

- uses: tauri-apps/tauri-action@v0
id: tauri
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: ${{ github.ref_name }}
releaseName: SC Helper ${{ github.ref_name }}
tagName: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name }}
releaseName: SC Helper ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name }}
releaseBody: |
Windows installer for SC Helper ${{ github.ref_name }}.
Windows installer for SC Helper.

Download `SC Helper_*_x64-setup.exe` below and run the installer.
Requires Windows 10/11 with WebView2.
Requires Windows 10/11 with [WebView2](https://developer.microsoft.com/microsoft-edge/webview2/).

See [README](https://github.com/codedevdev/sc-helper#download) for details.
releaseDraft: true
releaseCommitish: ${{ github.sha }}
releaseDraft: false
prerelease: false
tauriScript: npm run tauri
args: --bundles nsis

- name: Upload NSIS installer (workflow artifact)
if: success()
uses: actions/upload-artifact@v4
with:
name: windows-latest-nsis
path: src-tauri/target/release/bundle/nsis/*.exe
if-no-files-found: error

- name: Verify release outputs
if: always()
shell: bash
run: |
echo "releaseId=${{ steps.tauri.outputs.releaseId }}"
echo "releaseHtmlUrl=${{ steps.tauri.outputs.releaseHtmlUrl }}"
echo "artifactPaths=${{ steps.tauri.outputs.artifactPaths }}"
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Search UX includes typeahead commodity/terminal filters, active filter chips, au

## Download

**Windows:** download the latest `SC Helper_*_x64-setup.exe` from [GitHub Releases](https://github.com/codedevdev/sc-helper/releases).
**Windows:** download the latest `SC Helper_*_x64-setup.exe` (or `SC.Helper_*_x64-setup.exe`) from [GitHub Releases](https://github.com/codedevdev/sc-helper/releases).

> Requires Windows 10/11 with [WebView2](https://developer.microsoft.com/microsoft-edge/webview2/) (pre-installed on Windows 11).

Expand Down Expand Up @@ -113,14 +113,20 @@ Current balance is calculated, not stored:

## Releases

Push a version tag to trigger a Windows installer build:
Download the Windows installer from **[GitHub Releases](https://github.com/codedevdev/sc-helper/releases)** — look for `SC Helper_*_x64-setup.exe`.

> The **Tags** page only has source code archives (zip/tar.gz). The `.exe` installer is attached to **Releases**, not Tags.

Push a version tag to build a new installer:

```powershell
git tag v0.1.0
git push origin v0.1.0
```

GitHub Actions creates a draft release with the NSIS `.exe` installer. Publish the draft when ready.
GitHub Actions builds the NSIS installer and publishes it to Releases automatically (~10–15 min). To re-run without a new tag: **Actions → Release → Run workflow**.

See [docs/deployment.md](docs/deployment.md) for permissions, verification, and troubleshooting.

## Disclaimer

Expand Down
59 changes: 59 additions & 0 deletions docs/deployment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# SC Helper — Deployment & Releases

## Download locations

| Source | URL | Notes |
|--------|-----|-------|
| **GitHub Releases** | https://github.com/codedevdev/sc-helper/releases | Primary — `SC Helper_*_x64-setup.exe` |
| **Tags page** | https://github.com/codedevdev/sc-helper/tags | Source zip/tar.gz only — **not** the installer |
| **Actions artifacts** | Actions → Release workflow → Artifacts | Backup if release upload fails |

## Release triggers

1. **Version tag** — push `v*` (e.g. `v0.1.0`) → [`.github/workflows/release.yml`](../.github/workflows/release.yml)
2. **Manual dispatch** — Actions → Release → Run workflow → enter existing tag name

## Repo permissions (required once)

**Settings → Actions → General → Workflow permissions** → **Read and write permissions**.

Without this, `GITHUB_TOKEN` cannot create GitHub Releases or upload `.exe` assets. The workflow YAML sets `permissions: contents: write`, but the repository default must also allow writes.

## Shipping a new version

1. Bump version in [`src-tauri/tauri.conf.json`](../src-tauri/tauri.conf.json) and [`package.json`](../package.json)
2. Commit and push to `main`
3. Tag and push:

```powershell
git tag v0.1.1
git push origin v0.1.1
```

4. Wait for the **Release** workflow (Windows, ~10–15 min)
5. Verify on [Releases](https://github.com/codedevdev/sc-helper/releases):
- Asset: `SC Helper_<version>_x64-setup.exe`
6. Optional: check Actions → Artifacts for `windows-latest-nsis` backup

## Re-run a failed release

**Option A — re-tag** (same version):

```powershell
git push origin :refs/tags/v0.1.0
git tag -d v0.1.0
git tag v0.1.0
git push origin v0.1.0
```

**Option B — workflow dispatch** (tag must already exist on GitHub):

Actions → Release → Run workflow → tag: `v0.1.0`

## CI (non-release)

Push/PR to `main` runs [`.github/workflows/ci.yml`](../.github/workflows/ci.yml): `npm ci`, `npm test`, `npm run build` on Ubuntu. No Tauri/MSVC required.

## Local desktop build (optional)

Requires MSVC Build Tools. See [README](../README.md#desktop-tauri--optional).
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"bundle": {
"active": true,
"targets": "all",
"targets": ["nsis"],
"icon": [
"icons/32x32.png",
"icons/128x128.png",
Expand Down
Loading