Skip to content

Commit 08fb5e8

Browse files
committed
chore(CI): add pre-release on tag - uploads wasm files as assets
1 parent 6b17d9e commit 08fb5e8

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

.github/workflows/rust-host.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,29 @@ jobs:
4343
run: just test
4444
- name: Test with wasm from http server (if it fails, you need to publish a new version of pluginlab)
4545
run: just test-e2e-pluginlab-http
46+
- name: Prepare wasm files
47+
run: ./scripts/prepare-wasm-files.sh --mode release --target-dir ./tmp/plugins
48+
- name: Cache wasm files
49+
id: cache-wasm-files
50+
uses: actions/cache@v4
51+
with:
52+
path: ./tmp/plugins
53+
key: ${{ runner.os }}-wasm-files-${{ github.sha }}
54+
55+
pre-release:
56+
if: github.ref_type == 'tag'
57+
permissions:
58+
contents: write
59+
runs-on: ubuntu-latest
60+
needs: build-and-test
61+
steps:
62+
- name: Restore cached wasm files
63+
id: cache-wasm-files-restore
64+
uses: actions/cache/restore@v4
65+
with:
66+
path: ./tmp/plugins
67+
key: ${{ runner.os }}-wasm-files-${{ github.sha }}
68+
- name: Pre-release
69+
uses: softprops/action-gh-release@v2
70+
with:
71+
files: ./tmp/plugins/*.wasm

0 commit comments

Comments
 (0)