Rename offline zip (#2413)

* Add release calver to offline.zip

* Update release template for correct offline.zip filename.

* Update sed for global search/replace of _VERSION_

* [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:
Nicholas Tollervey
2025-11-26 15:02:30 +00:00
committed by GitHub
parent 97f5922973
commit 90ae3cea95
2 changed files with 10 additions and 6 deletions

View File

@@ -60,9 +60,12 @@ jobs:
- name: build offline
run: npm run build:offline
- name: Rename offline.zip with version metadata
run: mv ./dist/offline.zip ./dist/offline_${{ github.ref_name }}.zip
- 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
run: sed -e 's#_PATH_#https://pyscript.net/releases/${{ github.ref_name }}/#g' -e 's#_DOC_VERSION_#${{ github.ref_name }}#g' -e 's#_TAG_VERSION_#/tag/${{ github.ref_name }}#g' -e 's#_VERSION_#${{ github.ref_name }}#g' ./public/index.html > ./core/dist/index.html
- name: Generate release.tar from snapshot and put it in dist/
working-directory: .
@@ -71,7 +74,7 @@ jobs:
- name: Upload offline.zip to release
env:
GH_TOKEN: ${{ github.token }}
run: gh release upload ${{ github.ref_name }} ./dist/offline.zip
run: gh release upload ${{ github.ref_name }} ./dist/offline_${{ github.ref_name }}.zip
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5