diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 06f8ef6fbd..278872d4fd 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,8 +7,8 @@ name: Publish on: push: tags: - - '[0-9]+.[0-9]+.[0-9]+' - - '[0-9]+.[0-9]+.[0-9]+-[A-Za-z]+.[0-9]+' + - "[0-9]+.[0-9]+.[0-9]+" + - "[0-9]+.[0-9]+.[0-9]+-[A-Za-z]+.[0-9]+" pull_request: concurrency: @@ -21,7 +21,7 @@ env: # Use the local .curlrc CURL_HOME: . # Disable DFX telemetry - DFX_TELEMETRY: 'off' + DFX_TELEMETRY: "off" jobs: build_dfx: @@ -31,7 +31,13 @@ jobs: matrix: # We build a dynamic-linked linux binary because otherwise HSM support fails with: # Error: IO: Dynamic loading not supported - target: [ x86_64-apple-darwin, aarch64-apple-darwin, x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu ] + target: + [ + x86_64-apple-darwin, + aarch64-apple-darwin, + x86_64-unknown-linux-gnu, + aarch64-unknown-linux-gnu, + ] include: - os: macos-14-large target: x86_64-apple-darwin @@ -166,7 +172,8 @@ jobs: strategy: fail-fast: false matrix: - name: [ 'x86_64-darwin', 'aarch64-darwin', 'x86_64-linux', 'aarch64-linux' ] + name: + ["x86_64-darwin", "aarch64-darwin", "x86_64-linux", "aarch64-linux"] steps: - uses: actions/checkout@v4 @@ -178,7 +185,7 @@ jobs: with: name: dfx-artifacts-${{ hashFiles('rust-toolchain.toml') }}-${{ matrix.name }} - - name: Upload tarball and sha256 + - name: Upload dfx tarballs and sha256 uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} @@ -187,3 +194,20 @@ jobs: tag: ${{ env.VERSION }} prerelease: true make_latest: false + publish-assets: + runs-on: ubuntu-latest + if: github.ref_type == 'tag' + needs: publish + steps: + - uses: actions/checkout@v4 + + - name: Setup environment variables + run: echo "VERSION=$GITHUB_REF_NAME" >> $GITHUB_ENV + + - name: Upload assets canister + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: src/distributed/assetstorage.{wasm.gz,did} + file_glob: true + tag: ${{ env.VERSION }}