Skip to content

Commit 3e98c3f

Browse files
committed
chore: action
1 parent b097ec0 commit 3e98c3f

File tree

1 file changed

+32
-10
lines changed

1 file changed

+32
-10
lines changed

.github/workflows/release.yml

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,37 @@ name: Release CI
22

33
on:
44
push:
5-
tags:
6-
- 'v*'
5+
branches:
6+
- release
77

88
jobs:
9-
publish-tauri:
9+
create-release:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
RELEASE_UPLOAD_ID: ${{ steps.create_release.outputs.id }}
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Setup node
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: 16
20+
- name: Get version
21+
run: echo "PACKAGE_VERSION=$(node -p "require('./src-tauri/tauri.conf.json').package.version")" >> $GITHUB_ENV
22+
- name: Create release
23+
id: create_release
24+
uses: actions/[email protected]
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
with:
28+
tag_name: v${{ env.PACKAGE_VERSION }}
29+
release_name: 'OhMyBox v${{ env.PACKAGE_VERSION }}'
30+
body: 'See the assets to download this version and install.'
31+
draft: true
32+
prerelease: false
33+
34+
build-tauri:
35+
needs: create-release
1036
strategy:
1137
fail-fast: false
1238
matrix:
@@ -33,7 +59,7 @@ jobs:
3359
- uses: jetli/[email protected]
3460
with:
3561
# Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest')
36-
version: latest
62+
version: v0.9.1
3763

3864
# Install rsw
3965
- name: Install rsw
@@ -55,13 +81,9 @@ jobs:
5581
5682
# Install & Build
5783
- name: Install app dependencies and build it
58-
run: yarn && yarn tauri build
84+
run: yarn && yarn build
5985
- uses: tauri-apps/tauri-action@v0
6086
env:
6187
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6288
with:
63-
tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
64-
releaseName: 'OhMyBox v__VERSION__'
65-
releaseBody: 'See the assets to download this version and install.'
66-
releaseDraft: true
67-
prerelease: false
89+
releaseId: ${{ needs.create-release.outputs.RELEASE_UPLOAD_ID }}

0 commit comments

Comments
 (0)