66 - ' v*'
77 workflow_dispatch :
88
9+ permissions :
10+ contents : write
11+
912jobs :
1013 create-release :
1114 runs-on : ubuntu-latest
1215 outputs :
13- release_id : ${{ steps.create-release.outputs.result }}
14- release_upload_url : ${{ steps.create-release .outputs.upload_url }}
16+ release_id : ${{ steps.create-release.outputs.id }}
17+ version : ${{ steps.get-version .outputs.version }}
1518 steps :
1619 - uses : actions/checkout@v4
1720
18- - name : Setup Node.js
19- uses : actions/setup-node@v4
20- with :
21- node-version : 20
22-
23- - name : Get version
24- run : echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
21+ - name : Get version from tag
22+ id : get-version
23+ run : |
24+ VERSION=${GITHUB_REF#refs/tags/v}
25+ echo "version=$VERSION" >> $GITHUB_OUTPUT
26+ echo "Version: $VERSION"
2527
2628 - name : Create Release
2729 id : create-release
28- uses : actions/create-release@v1
29- env :
30- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
30+ uses : softprops/action-gh-release@v1
3131 with :
32- tag_name : v ${{ env.PACKAGE_VERSION }}
33- release_name : Logarithm v ${{ env.PACKAGE_VERSION }}
32+ tag_name : ${{ github.ref_name }}
33+ name : Logarithm ${{ github.ref_name }}
3434 body : |
35- ## Logarithm v ${{ env.PACKAGE_VERSION }}
35+ ## Logarithm ${{ github.ref_name }}
3636
3737 ### Downloads
38- - **Windows**: `Logarithm_${{ env.PACKAGE_VERSION }}_x64_en-US.msi` or `.exe`
39- - **macOS**: `Logarithm_${{ env.PACKAGE_VERSION }}_x64.dmg` (Intel) or `Logarithm_${{ env.PACKAGE_VERSION }}_aarch64.dmg` (Apple Silicon)
40- - **Linux**: `logarithm_${{ env.PACKAGE_VERSION }}_amd64.deb` or `.AppImage`
38+ Choose the appropriate installer for your platform:
39+
40+ - **Windows**:
41+ - `Logarithm_${{ steps.get-version.outputs.version }}_x64-setup.exe` (Recommended)
42+ - `Logarithm_${{ steps.get-version.outputs.version }}_x64_en-US.msi`
43+
44+ - **macOS**:
45+ - `Logarithm_${{ steps.get-version.outputs.version }}_aarch64.dmg` (Apple Silicon M1/M2/M3)
46+ - `Logarithm_${{ steps.get-version.outputs.version }}_x64.dmg` (Intel)
47+
48+ - **Linux**:
49+ - `logarithm_${{ steps.get-version.outputs.version }}_amd64.deb` (Debian/Ubuntu)
50+ - `logarithm_${{ steps.get-version.outputs.version }}_amd64.AppImage` (Universal)
4151
4252 ### Installation
43- - **Windows**: Download and run the `.msi` or `.exe` installer
44- - **macOS**: Download the `.dmg`, open it, and drag Logarithm to Applications
45- - **Linux**: Download the `.deb` and install with `sudo dpkg -i logarithm_*.deb` or run the `.AppImage`
53+
54+ **Windows**: Download and run the `.exe` or `.msi` installer
55+
56+ **macOS**: Download the `.dmg`, open it, and drag Logarithm to Applications folder
57+
58+ **Linux**:
59+ - Debian/Ubuntu: `sudo dpkg -i logarithm_*.deb`
60+ - AppImage: `chmod +x logarithm_*.AppImage && ./logarithm_*.AppImage`
4661
4762 ### What's New
48- See [CHANGELOG.md](https://github.com/mmycin/Logarithm/blob/main/CHANGELOG.md) for details.
49- draft : false
63+ See [CHANGELOG.md](https://github.com/mmycin/Logarithm/blob/main/CHANGELOG.md) for full details.
64+ draft : true
5065 prerelease : false
66+ token : ${{ secrets.GITHUB_TOKEN }}
5167
5268 build-tauri :
5369 needs : create-release
8298 with :
8399 targets : ${{ matrix.target }}
84100
101+ - name : Rust cache
102+ uses : swatinem/rust-cache@v2
103+ with :
104+ workspaces : ' ./src-tauri -> target'
105+
85106 - name : Install dependencies (Ubuntu only)
86107 if : matrix.platform == 'ubuntu-22.04'
87108 run : |
@@ -97,11 +118,14 @@ jobs:
97118 run : pnpm install
98119
99120 - name : Install Trunk
100- run : cargo install trunk
121+ run : cargo install trunk --locked
101122
102123 - name : Add wasm target
103124 run : rustup target add wasm32-unknown-unknown
104125
126+ - name : Build frontend
127+ run : trunk build --release
128+
105129 - uses : tauri-apps/tauri-action@v0
106130 env :
107131 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -114,13 +138,8 @@ jobs:
114138 runs-on : ubuntu-latest
115139 steps :
116140 - name : Publish Release
117- uses : actions/github-script@v7
141+ uses : softprops/action-gh-release@v1
118142 with :
119- github-token : ${{ secrets.GITHUB_TOKEN }}
120- script : |
121- github.rest.repos.updateRelease({
122- owner: context.repo.owner,
123- repo: context.repo.repo,
124- release_id: ${{ needs.create-release.outputs.release_id }},
125- draft: false
126- })
143+ tag_name : ${{ github.ref_name }}
144+ draft : false
145+ token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments