-
Notifications
You must be signed in to change notification settings - Fork 11
103 lines (91 loc) · 3.11 KB
/
030_create_release.yaml
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
97
98
99
100
101
102
103
name: Create release
on:
push:
tags:
- '*'
jobs:
srtool:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache target dir
uses: actions/cache@v3
with:
path: '${{ github.workspace }}/substrate-node/runtime/target'
key: srtool-target-tfchain-${{ github.sha }}
restore-keys: |
srtool-target-tfchain-
srtool-target-
- name: Srtool build
id: srtool_build
uses: chevdor/[email protected]
with:
workdir: '${{ github.workspace }}/substrate-node'
package: tfchain-runtime
runtime_dir: runtime
tag: "1.77.0"
- name: Summary
run: |
echo '${{ steps.srtool_build.outputs.json }}' | jq . > tfchain-srtool-digest.json
cat tfchain-srtool-digest.json
echo "Runtime location: ${{ steps.srtool_build.outputs.wasm }}"
- name: Upload tfchain srtool json
uses: actions/upload-artifact@v3
with:
name: tfchain-srtool-digest-json
path: tfchain-srtool-digest.json
- name: Upload runtime
uses: actions/upload-artifact@v3
with:
name: tfchain-runtime
path: substrate-node/${{ steps.srtool_build.outputs.wasm_compressed }}
release:
needs: srtool
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # Work around for https://github.com/heinrichreimer/action-github-changelog-generator/issues/21
- name: Download artifacts
id: download
uses: actions/download-artifact@v3
with:
name: tfchain-runtime
path: tfchain-runtime
- name: Generate changelog
id: changelog
uses: heinrichreimer/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
headerLabel: "# 📑 Changelog"
breakingLabel: '### 💥 Breaking'
enhancementLabel: '### 🚀 Enhancements'
bugsLabel: '### 🐛 Bug fixes'
securityLabel: '### 🛡️ Security'
issuesLabel: '### 📁 Other issues'
prLabel: '### 📁 Other pull requests'
addSections: '{"documentation":{"prefix":"### 📖 Documentation","labels":["documentation"]},"tests":{"prefix":"### ✅ Testing","labels":["tests"]}}'
onlyLastTag: true
issues: false
issuesWoLabels: false
pullRequests: true
prWoLabels: true
author: true
unreleased: true
compareLink: true
stripGeneratorNotice: true
verbose: true
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_KEY }}
with:
tag_name: ${{ github.ref }}
name: Release ${{ github.ref_name }}
draft: false
fail_on_unmatched_files: true
prerelease: ${{ contains(github.ref, 'rc') }}
body: ${{ steps.changelog.outputs.changelog }}
files: tfchain-runtime/*