generated from gear-foundation/dapp-template
-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (36 loc) · 1.16 KB
/
ci.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
name: CI
on:
pull_request:
push:
branches: [master]
tags: ['[0-9]+.[0-9]+.[0-9]+']
env:
CARGO_TERM_COLOR: always
permissions:
contents: write
jobs:
all:
name: All
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: ${{ github.ref_type == 'tag' && 'Build' || 'Build & CI' }}
run: |
sudo apt-get update && sudo apt-get install -y binaryen
[ $GITHUB_REF_TYPE = "tag" ] && cargo b --workspace || cargo xtask ci
- name: Update the nightly tag
if: github.ref == 'refs/heads/master'
run: |
git tag nightly
git push -f origin nightly
- name: Release
if: github.event_name != 'pull_request'
uses: softprops/action-gh-release@v1
with:
name: ${{ github.ref == 'refs/heads/master' && 'Nightly' || github.ref_name }}
tag_name: ${{ github.ref == 'refs/heads/master' && 'nightly' || github.ref_name }}
prerelease: ${{ github.ref == 'refs/heads/master' }}
files: |
target/wasm32-unknown-unknown/debug/*.*.wasm
target/wasm32-unknown-unknown/debug/*.meta.txt