mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 10:17:23 -05:00
Update publish-release GH workflow to automatically include the offline.zip asset. (#2411)
* Update publish-release GH workflow to include offline.zip asset. * Adjust upload offline.zip to use gh CLI instead of a third party GH action. * Update release page template to reference offline.zip. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
7afe5c55e1
commit
4a801fa3a2
13
.github/workflows/publish-release.yml
vendored
13
.github/workflows/publish-release.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
contents: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
@@ -57,6 +57,9 @@ jobs:
|
||||
- name: build
|
||||
run: npm run build
|
||||
|
||||
- name: build offline
|
||||
run: npm run build:offline
|
||||
|
||||
- name: Generate index.html in snapshot
|
||||
working-directory: .
|
||||
run: sed -e 's#_PATH_#https://pyscript.net/releases/${{ github.ref_name }}/#' -e 's#_DOC_VERSION_#${{ github.ref_name }}#' -e 's#_TAG_VERSION_#/tag/${{ github.ref_name }}#' -e 's#_VERSION_#${{ github.ref_name }}#' ./public/index.html > ./core/dist/index.html
|
||||
@@ -65,6 +68,11 @@ jobs:
|
||||
working-directory: .
|
||||
run: tar -cvf ../release.tar * && mv ../release.tar .
|
||||
|
||||
- name: Upload offline.zip to release
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: gh release upload ${{ github.ref_name }} ./dist/offline.zip
|
||||
|
||||
- name: Configure AWS credentials
|
||||
uses: aws-actions/configure-aws-credentials@v5
|
||||
with:
|
||||
@@ -73,6 +81,5 @@ jobs:
|
||||
|
||||
- name: Sync to S3
|
||||
run:
|
||||
| # Update /latest and create an explicitly versioned directory under releases/YYYY.MM.MICRO/
|
||||
aws s3 sync --quiet ./dist/ s3://pyscript.net/latest/
|
||||
| # Create an explicitly versioned directory under releases/YYYY.MM.MICRO/
|
||||
aws s3 sync --quiet ./dist/ s3://pyscript.net/releases/${{ github.ref_name }}/
|
||||
|
||||
@@ -84,6 +84,10 @@
|
||||
<li><a href="core.css">core.css</a></li>
|
||||
<li><a href="core.js">core.js</a></li>
|
||||
<li><a href="core.js.map">core.js.map</a></li>
|
||||
<li>
|
||||
<a href="offline.zip">offline.zip</a> (PyScript _VERSION_
|
||||
zipped up for offline use)
|
||||
</li>
|
||||
</ul>
|
||||
<div id="out"></div>
|
||||
<script type="py">
|
||||
|
||||
Reference in New Issue
Block a user