-
Notifications
You must be signed in to change notification settings - Fork 121
80 lines (67 loc) · 2.21 KB
/
contracts.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Contracts CI - Build
on:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
DEFAULT_TOOLCHAIN: 1.82.0
defaults:
run:
working-directory: contracts
permissions:
contents: write
id-token: write
pages: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
all:
name: Build - Release
runs-on: self-hosted
container:
image: ghcr.io/gear-foundation/dapps/ci-rust:${{ env.DEFAULT_TOOLCHAIN }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install rust-src component
run: rustup component add rust-src --toolchain stable-x86_64-unknown-linux-gnu
- name: Build
run: 'cargo build --release --workspace;'
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: wasm
path: |
contracts/target/wasm32-unknown-unknown/release/*.*.wasm
contracts/target/wasm32-unknown-unknown/release/*.meta.txt
- name: Update the nightly tag
if: github.ref == 'refs/heads/master'
run: |
git tag nightly
git push -f origin nightly
- name: Release
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: |
contracts/target/wasm32-unknown-unknown/release/*.*.wasm
contracts/target/wasm32-unknown-unknown/release/*.meta.txt
- name: Upload the GitHub Pages artifact
if: github.ref == 'refs/heads/master'
uses: actions/upload-pages-artifact@v3
with:
path: contracts/target/doc
# A separate job for the Pages deployment is neccessary to prevent the spam from the "deployed"
# messages in PRs.
# https://github.com/orgs/community/discussions/36919
deploy:
name: Deploy GitHub Pages
if: github.ref == 'refs/heads/master'
needs: all
environment: github-pages
runs-on: self-hosted
steps:
- name: Deploy GitHub Pages
uses: actions/deploy-pages@v4