Skip to content

Commit 1ca8c7d

Browse files
committed
chore: modify workflow
1 parent 93435fc commit 1ca8c7d

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,23 @@ jobs:
3131
${{ runner.OS }}-build-
3232
${{ runner.OS }}-
3333
34-
- name: yarn install, build
34+
- name: yarn install, build, bundle
3535
env:
3636
REACT_APP_SHOW_AD: true
3737
REACT_APP_HASH_ROUTER: true
3838
run: |
3939
yarn install
4040
CI=false yarn build
41+
sed -i '' 's/"\/home"/"\/#home"/g' build/manifest.json
42+
tar -czf build.tar.gz ./build
4143
42-
- name: Archive production artifacts
43-
uses: actions/upload-artifact@v2
44+
- name: Upload Release Asset
45+
id: upload-release-asset
46+
uses: actions/upload-release-asset@v1
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4449
with:
45-
name: release-build
46-
path: |
47-
build
50+
upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
51+
asset_path: ./build.tar.gz
52+
asset_name: build.tar.gz
53+
asset_content_type: application/tar+gzip

0 commit comments

Comments
 (0)