Skip to content

Commit 32c21b0

Browse files
chore: Publish asset canister (#4469)
1 parent 1f5cfd7 commit 32c21b0

File tree

1 file changed

+30
-6
lines changed

1 file changed

+30
-6
lines changed

.github/workflows/publish.yml

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ name: Publish
77
on:
88
push:
99
tags:
10-
- '[0-9]+.[0-9]+.[0-9]+'
11-
- '[0-9]+.[0-9]+.[0-9]+-[A-Za-z]+.[0-9]+'
10+
- "[0-9]+.[0-9]+.[0-9]+"
11+
- "[0-9]+.[0-9]+.[0-9]+-[A-Za-z]+.[0-9]+"
1212
pull_request:
1313

1414
concurrency:
@@ -21,7 +21,7 @@ env:
2121
# Use the local .curlrc
2222
CURL_HOME: .
2323
# Disable DFX telemetry
24-
DFX_TELEMETRY: 'off'
24+
DFX_TELEMETRY: "off"
2525

2626
jobs:
2727
build_dfx:
@@ -31,7 +31,13 @@ jobs:
3131
matrix:
3232
# We build a dynamic-linked linux binary because otherwise HSM support fails with:
3333
# Error: IO: Dynamic loading not supported
34-
target: [ x86_64-apple-darwin, aarch64-apple-darwin, x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu ]
34+
target:
35+
[
36+
x86_64-apple-darwin,
37+
aarch64-apple-darwin,
38+
x86_64-unknown-linux-gnu,
39+
aarch64-unknown-linux-gnu,
40+
]
3541
include:
3642
- os: macos-14-large
3743
target: x86_64-apple-darwin
@@ -166,7 +172,8 @@ jobs:
166172
strategy:
167173
fail-fast: false
168174
matrix:
169-
name: [ 'x86_64-darwin', 'aarch64-darwin', 'x86_64-linux', 'aarch64-linux' ]
175+
name:
176+
["x86_64-darwin", "aarch64-darwin", "x86_64-linux", "aarch64-linux"]
170177
steps:
171178
- uses: actions/checkout@v4
172179

@@ -178,7 +185,7 @@ jobs:
178185
with:
179186
name: dfx-artifacts-${{ hashFiles('rust-toolchain.toml') }}-${{ matrix.name }}
180187

181-
- name: Upload tarball and sha256
188+
- name: Upload dfx tarballs and sha256
182189
uses: svenstaro/upload-release-action@v2
183190
with:
184191
repo_token: ${{ secrets.GITHUB_TOKEN }}
@@ -187,3 +194,20 @@ jobs:
187194
tag: ${{ env.VERSION }}
188195
prerelease: true
189196
make_latest: false
197+
publish-assets:
198+
runs-on: ubuntu-latest
199+
if: github.ref_type == 'tag'
200+
needs: publish
201+
steps:
202+
- uses: actions/checkout@v4
203+
204+
- name: Setup environment variables
205+
run: echo "VERSION=$GITHUB_REF_NAME" >> $GITHUB_ENV
206+
207+
- name: Upload assets canister
208+
uses: svenstaro/upload-release-action@v2
209+
with:
210+
repo_token: ${{ secrets.GITHUB_TOKEN }}
211+
file: src/distributed/assetstorage.{wasm.gz,did}
212+
file_glob: true
213+
tag: ${{ env.VERSION }}

0 commit comments

Comments
 (0)