Skip to content

Commit 044289c

Browse files
committed
chore: 将Nightly工作流改为Canary
1 parent 9eac5f8 commit 044289c

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed
Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
name: Nightly
1+
name: Canary
22

33
on:
4-
schedule:
5-
- cron: "0 0 * * *"
4+
push:
5+
branches:
6+
- rust
67
workflow_dispatch:
78

89
jobs:
@@ -25,10 +26,17 @@ jobs:
2526
with:
2627
prefix-key: "wasm"
2728

28-
- name: Install Trunk
29+
- name: Set version
2930
run: |
30-
wget -qO- https://github.com/trunk-rs/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
31-
sudo mv trunk /usr/local/bin/
31+
SHA=$(git rev-parse --short HEAD)
32+
VERSION="0.0.0-canary.$SHA"
33+
echo "ver: $VERSION"
34+
sed -i "s/^version = \"0.0.0-dev\"/version = \"$VERSION\"/" Cargo.toml
35+
36+
- name: Install Trunk
37+
uses: jetli/trunk-action@v0.5.1
38+
with:
39+
version: "latest"
3240

3341
- name: Build with Trunk
3442
run: |
@@ -47,3 +55,4 @@ jobs:
4755
with:
4856
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
4957
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
58+
githubToken: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)