-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (52 loc) · 1.61 KB
/
build_and_publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Build and Release
on:
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
export PATH="$HOME/.cargo/bin:$PATH"
rustc --version
cargo --version
- name: Install wasm-pack
run: |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
wasm-pack --version
- name: Install Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Build
run: |
deno task build --bypass-pkg-check --bypass-rs-check
- name: Typecheck
run: |
deno check src/**.ts
- name: Test
run: |
deno task test
- name: Read version from release.json
id: read_version
run: |
sudo apt-get update -q
sudo apt-get install -y jq
echo "::set-output name=version::$(jq -r .version release.json)"
- name: Create a new tag
env:
RELEASE_VERSION: ${{ steps.read_version.outputs.version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "Rajdeep Malakar"
git config user.email "[email protected]"
git add -A
git add pkg -f
git commit -m "RELEASE $RELEASE_VERSION"
git tag $RELEASE_VERSION -m "Release $RELEASE_VERSION"
git push origin $RELEASE_VERSION