Skip to content
This repository was archived by the owner on Jul 28, 2023. It is now read-only.

Commit 1f25e8a

Browse files
committed
CI: improve release pileline
1 parent 1092926 commit 1f25e8a

File tree

2 files changed

+49
-13
lines changed

2 files changed

+49
-13
lines changed

.github/workflows/release-post.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: OnRelease
1+
name: Release Ext
22
on:
33
workflow_run:
44
workflows: [Release]

.github/workflows/release.yml

Lines changed: 48 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ jobs:
3737
echo "
3838
## TODO: EDIT ME BEFORE PUBLISH
3939
40-
[link-tools]: ${{ github.event.repository.html_url }}/actions?query=workflow%3A%22Build+Release+Tools%22
41-
[link-ext]: ${{ github.event.repository.html_url }}/actions?query=workflow%3A%22Build+Release+Ext%22
42-
[badge-tools]: ${{ github.event.repository.html_url }}/workflows/Build%20Release%20Tools/badge.svg?event=workflow_run (tools workflow)
43-
[badge-ext]: ${{ github.event.repository.html_url }}/workflows/Build%20Release%20Ext/badge.svg?event=workflow_run (ext workflow)
40+
[link-main]: ${{ github.event.repository.html_url }}/actions?query=workflow%3A%22Release%22
41+
[link-ext]: ${{ github.event.repository.html_url }}/actions?query=workflow%3A%22Release+Ext%22
42+
[badge-main]: ${{ github.event.repository.html_url }}/workflows/Release/badge.svg?event=workflow_run (main workflow)
43+
[badge-ext]: ${{ github.event.repository.html_url }}/workflows/Release%20Ext/badge.svg?event=workflow_run (ext workflow)
4444
4545
__Please wait build completions for:__
46-
- [![Build Release Tools][badge-tools]][link-tools]
46+
- [![Build Release Tools][badge-main]][link-main]
4747
- [![Build Release Ext][badge-ext]][link-ext]
4848
4949
- - -
@@ -52,7 +52,7 @@ jobs:
5252
5353
$RESULT_LOG_ACT
5454
55-
__Changelog ${TAG_SECOND}__…${TAG_FIRST}
55+
__${TAG_SECOND}__…${TAG_FIRST}
5656
5757
$RESULT_LOG_POST
5858
@@ -68,7 +68,7 @@ jobs:
6868
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6969
with:
7070
draft: true
71-
prerelease: true
71+
prerelease: false
7272
tag_name: ${{ github.ref }}
7373
release_name: ${{ github.ref }}
7474
body_path: ${{ steps.changelog.outputs.file }}
@@ -91,13 +91,15 @@ jobs:
9191
build:
9292
needs: release
9393
name: Build
94-
runs-on: ${{ matrix.os }}
94+
runs-on: ${{ matrix.os.value }}
9595
strategy:
9696
fail-fast: false
9797
matrix:
9898
os:
99-
- macos-latest
100-
- ubuntu-latest
99+
- name: macos
100+
value: macos-latest
101+
- name: ubuntu
102+
value: ubuntu-latest
101103
dove:
102104
- 1.3.2
103105
defaults:
@@ -136,6 +138,9 @@ jobs:
136138
target: wasm32-unknown-unknown
137139
override: false
138140

141+
- name: Restore Rust cache
142+
uses: Swatinem/rust-cache@v1
143+
139144
- name: Get Dove
140145
uses: pontem-network/get-dove@main
141146
with:
@@ -146,12 +151,43 @@ jobs:
146151
- name: Build
147152
run: cargo +${{ steps.rust.outputs.version }} build --release
148153

149-
- name: Upload
154+
- name: Upload Node
150155
uses: actions/upload-release-asset@v1
151156
env:
152157
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
153158
with:
154159
upload_url: ${{ needs.release.outputs.upload_url }}
155160
asset_path: target/release/pontem
156-
asset_name: pontem-${{ matrix.os }}-${{ steps.build-info.outputs.arch }}
161+
asset_name: pontem-${{ matrix.os.name }}-${{ steps.build-info.outputs.arch }}
157162
asset_content_type: application/octet-stream
163+
164+
- name: Upload Runtime
165+
if: matrix.os.name == 'ubuntu'
166+
uses: actions/upload-release-asset@v1
167+
env:
168+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
169+
with:
170+
upload_url: ${{ needs.release.outputs.upload_url }}
171+
asset_path: target/release/wbuild/pontem-runtime/target/wasm32-unknown-unknown/release/pontem_runtime.wasm
172+
asset_name: pontem_runtime.wasm
173+
asset_content_type: application/wasm
174+
175+
- name: Upload Runtime Compact
176+
if: matrix.os.name == 'ubuntu'
177+
uses: actions/upload-release-asset@v1
178+
env:
179+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
180+
with:
181+
upload_url: ${{ needs.release.outputs.upload_url }}
182+
asset_path: target/release/wbuild/pontem-runtime/pontem_runtime.compact.wasm
183+
asset_name: pontem_runtime.compact.wasm
184+
asset_content_type: application/wasm
185+
# also
186+
# wbuild/polkadot-runtime
187+
# - polkadot_runtime.compact.compressed.wasm
188+
# - polkadot_runtime.compact.wasm
189+
# - polkadot_runtime.wasm
190+
# wbuild/rococo-runtime
191+
# - rococo_runtime.compact.compressed.wasm
192+
# - rococo_runtime.compact.wasm
193+
# - rococo_runtime.wasm

0 commit comments

Comments
 (0)