-
Notifications
You must be signed in to change notification settings - Fork 3
96 lines (85 loc) · 2.54 KB
/
release.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Pre-release
on:
push:
tags:
- '*'
branches:
- '**'
permissions:
contents: write
packages: write
repository-projects: write
jobs:
build_wasm:
name: Build Cosmwasm Contracts
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
submodules: true
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: 1.69.0
target: wasm32-unknown-unknown
override: true
profile: minimal
- name: Install cw-check
run: |
cargo install [email protected] --locked
- name: Compile WASM
run: |
# sudo chmod -R 777 artifacts
# sudo chmod -R 777 scripts
bash ./scripts/generate_wasm.sh
ls -la
ls artifacts
cd artifacts/archway && zip -r ../../cosmwasm-contracts.zip . -j
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: cosmwasm-contracts
path: cosmwasm-contracts.zip
release:
name: Release and Publish
runs-on: ubuntu-latest
needs:
- build_wasm
steps:
- name: Initialize variables
id: vars
run: |
echo «::set-output name=date::$(date +'%Y-%m-%d')»
echo «::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)»
- name: Download Cosmwasm Artifacts
uses: actions/download-artifact@v4
with:
name: cosmwasm-contracts
path: cosmwasm-contracts
- name: Unzip Cosmwasm Artifacts
run: unzip cosmwasm-contracts/cosmwasm-contracts.zip -d cosmwasm-contracts && rm -rf cosmwasm-contracts/cosmwasm-contracts.zip
- name: Changelog
uses: scottbrenner/generate-changelog-action@master
id: Changelog
env:
REPO: ${{ github.repository }}
- name: Generate checksum
uses: jmgilman/actions-generate-checksum@v1
with:
patterns: |
./cosmwasm-contracts/*
output: check256sums.txt
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
token: ${{ secrets.GITHUB_TOKEN }}
body: |
${{ steps.Changelog.outputs.changelog }}
files: |
./cosmwasm-contracts/*
check256sums.txt