Skip to content

Commit 565bf7c

Browse files
authored
Fix race condition in bundle (#240)
1 parent 7de68a1 commit 565bf7c

File tree

4 files changed

+29
-16
lines changed

4 files changed

+29
-16
lines changed

.github/workflows/alpha-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
with:
2222
ref: ${{ inputs.ref || 'main' }}
2323
fetch-depth: 0
24+
fetch-tags: true
2425

2526
- name: Configure Git
2627
run: |

.github/workflows/beta-release.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
get-configs:
99
uses: ./.github/workflows/configs.yml
1010

11-
promote-main-to-beta:
11+
create-beta-tag:
1212
needs: [get-configs]
1313
runs-on: ubuntu-latest
1414
permissions:
@@ -22,18 +22,12 @@ jobs:
2222
fetch-depth: 0
2323
fetch-tags: true
2424

25-
- name: Setup Node.js ${{ needs.get-configs.outputs.node-version }}
26-
uses: actions/setup-node@v4
27-
with:
28-
node-version: ${{ needs.get-configs.outputs.node-version }}
29-
cache: 'npm'
30-
3125
- name: Configure Git
3226
run: |
3327
git config user.name "github-actions[bot]"
3428
git config user.email "github-actions[bot]@users.noreply.github.com"
3529
36-
- name: Bump Version and Tag
30+
- name: Tag
3731
id: version-and-tag
3832
run: |
3933
PKG_VERSION=$(jq -r .version package.json)
@@ -46,9 +40,9 @@ jobs:
4640
echo "tag=$FULL_TAG" >> $GITHUB_OUTPUT
4741
4842
call-release:
49-
needs: [promote-main-to-beta]
43+
needs: [create-beta-tag]
5044
uses: ./.github/workflows/release.yml
5145
permissions:
5246
contents: write
5347
with:
54-
tag: ${{ needs.promote-main-to-beta.outputs.tag }}
48+
tag: ${{ needs.create-beta-tag.outputs.tag }}

.github/workflows/release.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,8 @@ jobs:
6969
ref: ${{ needs.version-and-tag.outputs.tag }}
7070
runs-on: ${{ matrix.os }}
7171

72-
bundle-and-release:
72+
bundle:
7373
needs: [ get-configs, version-and-tag, build-and-test ]
74-
permissions:
75-
contents: write
7674
strategy:
7775
fail-fast: true
7876
matrix:
@@ -187,13 +185,29 @@ jobs:
187185
echo "Creating zip: ${{ env.ASSET_NAME }}"
188186
Compress-Archive -Path ./bundle/production/* -DestinationPath ./${{ env.ASSET_NAME }}
189187
188+
- name: Upload artifact
189+
uses: actions/upload-artifact@v4
190+
with:
191+
name: ${{ steps.set-asset-name.outputs.ASSET_NAME }}
192+
path: ${{ steps.set-asset-name.outputs.ASSET_NAME }}
193+
if-no-files-found: error
194+
195+
release:
196+
needs: [ version-and-tag, bundle ]
197+
runs-on: ubuntu-latest
198+
permissions:
199+
contents: write
200+
steps:
201+
- name: Download all artifacts
202+
uses: actions/download-artifact@v4
203+
with:
204+
path: artifacts
205+
190206
- name: Create GitHub Release
191207
uses: softprops/action-gh-release@v2
192-
env:
193-
ASSET_NAME: ${{ steps.set-asset-name.outputs.ASSET_NAME }}
194208
with:
195209
tag_name: ${{ needs.version-and-tag.outputs.tag }}
196210
prerelease: ${{ needs.version-and-tag.outputs.is-prerelease }}
197-
files: ${{ env.ASSET_NAME }}
211+
files: artifacts/**/*
198212
generate_release_notes: true
199213
fail_on_unmatched_files: true

webpack.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ function createPlugins(isDevelopment, outputPath, mode, env, targetPlatform, tar
7373
from: 'assets',
7474
to: 'assets',
7575
},
76+
{
77+
from: 'node_modules/cfn-guard/guard_bg.wasm',
78+
to: 'guard_bg.wasm',
79+
},
7680
],
7781
}),
7882
);

0 commit comments

Comments
 (0)