Skip to content

Commit 5106e03

Browse files
authored
Move logic to release branch (#35)
* Add release workflow * Install pnpm * Pre release script
1 parent fceeede commit 5106e03

File tree

7 files changed

+33
-182
lines changed

7 files changed

+33
-182
lines changed

.github/actions/constants.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/actions/env.d.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/actions/release.ts

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/actions/versionCheck.ts

Lines changed: 0 additions & 50 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 31 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,41 @@
1-
name: Release
2-
1+
name: 'Release'
32
on:
43
push:
5-
branches: [main]
4+
branches:
5+
- release
66

77
jobs:
8-
release:
9-
runs-on: macos-latest
10-
permissions: write-all
11-
name: Release
8+
publish-tauri:
9+
permissions:
10+
contents: write
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
platform: [macos-latest]
15+
16+
runs-on: ${{ matrix.platform }}
1217
steps:
13-
- name: Checkout repository
14-
uses: actions/checkout@v2
15-
16-
- name: Setup Node.js
17-
uses: actions/setup-node@v2
18-
with:
19-
node-version: '16'
20-
21-
- uses: pnpm/action-setup@v2
22-
name: Install pnpm
23-
with:
24-
version: latest
25-
run_install: false
26-
27-
- name: Get pnpm store directory
28-
id: pnpm-cache
29-
shell: bash
30-
run: |
31-
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
32-
33-
- uses: actions/cache@v3
34-
name: Setup pnpm cache
18+
- uses: actions/checkout@v3
19+
- name: setup node
20+
uses: actions/setup-node@v3
3521
with:
36-
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
37-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
38-
restore-keys: |
39-
${{ runner.os }}-pnpm-store-
40-
41-
- name: Install dependencies
42-
run: pnpm install
43-
44-
- name: Check if new release
45-
id: releaseCheck
46-
run: pnpx tsx .github/actions/versionCheck.ts
47-
env:
48-
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
49-
CLIENT_ID: ${{ secrets.CLIENT_ID }}
50-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51-
22+
node-version: 16
5223
- name: install Rust stable
53-
if: steps.releaseCheck.outputs.isNewRelease == 'true'
5424
uses: dtolnay/rust-toolchain@stable
55-
with:
56-
targets: 'aarch64-apple-darwin,x86_64-apple-darwin'
57-
58-
- name: Run Release
59-
if: steps.releaseCheck.outputs.isNewRelease == 'true'
60-
run: pnpx tsx .github/actions/release.ts
25+
- name: install dependencies (ubuntu only)
26+
if: matrix.platform == 'ubuntu-20.04'
27+
run: |
28+
sudo apt-get update
29+
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
30+
- name: install pnpm
31+
run: npm install -g [email protected]
32+
- name: install frontend dependencies
33+
run: pnpm install
34+
- uses: tauri-apps/tauri-action@v0
6135
env:
62-
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
63-
CLIENT_ID: ${{ secrets.CLIENT_ID }}
6436
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
with:
38+
tagName: __VERSION__
39+
releaseName: '__VERSION__'
40+
releaseDraft: false
41+
prerelease: true

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gitification",
3-
"version": "1.0.1",
3+
"version": "0.0.10",
44
"type": "module",
55
"scripts": {
66
"dev": "run-p vite:dev devtools",

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"package": {
1010
"productName": "Gitification",
11-
"version": "1.0.1"
11+
"version": "0.0.10"
1212
},
1313
"tauri": {
1414
"systemTray": {

0 commit comments

Comments
 (0)