Skip to content

Commit 14064b6

Browse files
committed
chore: release
1 parent 98b7d37 commit 14064b6

File tree

2 files changed

+41
-19
lines changed

2 files changed

+41
-19
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ name: Release CI
22

33
on:
44
push:
5-
branches:
6-
- release
5+
# Sequence of patterns matched against refs/tags
6+
tags:
7+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
78

89
jobs:
910
create-release:
@@ -12,24 +13,22 @@ jobs:
1213
RELEASE_UPLOAD_ID: ${{ steps.create_release.outputs.id }}
1314

1415
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
16+
- name: Query version number
17+
id: get_version
18+
shell: bash
19+
run: |
20+
echo "using version tag ${GITHUB_REF:10}"
21+
echo ::set-output name=version::"${GITHUB_REF:10}"
22+
23+
- name: Create Release
2324
id: create_release
2425
uses: actions/create-release@v1
2526
env:
2627
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2728
with:
28-
tag_name: v${{ env.PACKAGE_VERSION }}
29-
release_name: 'OhMyBox v${{ env.PACKAGE_VERSION }}'
29+
tag_name: v${{ steps.get_version.outputs.VERSION }}
30+
release_name: 'OhMyBox v${{ steps.get_version.outputs.VERSION }}'
3031
body: 'See the assets to download this version and install.'
31-
draft: true
32-
prerelease: false
3332

3433
build-tauri:
3534
needs: create-release
@@ -41,36 +40,39 @@ jobs:
4140
runs-on: ${{ matrix.platform }}
4241
steps:
4342
- uses: actions/checkout@v2
43+
4444
- name: setup node
4545
uses: actions/setup-node@v1
4646
with:
4747
node-version: 16
48+
4849
- name: install Rust stable
4950
uses: actions-rs/toolchain@v1
5051
with:
5152
toolchain: stable
53+
54+
- uses: Swatinem/rust-cache@v1
55+
5256
- name: install dependencies (ubuntu only)
5357
if: matrix.platform == 'ubuntu-latest'
5458
run: |
5559
sudo apt-get update
5660
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
5761
58-
# Install wasm-pack
62+
- name: Install wasm-pack
5963
- uses: jetli/[email protected]
6064
with:
6165
# Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest')
6266
version: v0.9.1
6367

64-
# Install rsw
6568
- name: Install rsw
6669
run: cargo install rsw
6770

68-
# Cache
6971
- name: Get yarn cache directory path
7072
id: yarn-cache-dir-path
7173
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
7274

73-
- name: Yarn Cache
75+
- name: Yarn cache
7476
uses: actions/cache@v2
7577
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
7678
with:
@@ -79,7 +81,6 @@ jobs:
7981
restore-keys: |
8082
${{ runner.os }}-yarn-
8183
82-
# Install & Build
8384
- name: Install app dependencies and build it
8485
run: yarn && yarn build
8586
- uses: tauri-apps/tauri-action@v0

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@
77
- [wasm-pack](https://github.com/rustwasm/wasm-pack)
88
- [rsw](https://github.com/rwasm/rsw-rs)
99

10+
### Install wasm-pack
11+
12+
```bash
13+
cargo install wasm-pack
14+
15+
# With Windows
16+
cargo install wasm-pack --version 0.9.1
17+
```
18+
19+
### Install rsw
20+
21+
```bash
22+
cargo install rsw
23+
```
24+
25+
**Note: If your operating system is `Windows`, it is recommended to install `wasm-pack v0.9.1`**
26+
1027
## Quick start
1128

1229
Note: Open two terminal windows, execute `yarn rsw watch` in the first and `yarn tauri dev` in the second. The order of execution is important, do not close the first window!
@@ -18,3 +35,7 @@ yarn rsw watch
1835
# 2. Front-end: start dev server
1936
yarn tauri dev
2037
```
38+
39+
## License
40+
41+
GPL-3.0 license © 2022 lencx

0 commit comments

Comments
 (0)