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

View File

@@ -85,8 +85,8 @@
<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)
<a href="offline__VERSION_.zip">offline__VERSION_.zip</a>
(PyScript _VERSION_ zipped up for offline use)
</li>
</ul>
<div id="out"></div>
@@ -125,8 +125,9 @@
d="M43.3,6h-1.6c-0.5,0-0.8,0.3-0.8,0.8V10c0,3.5-2.8,6.4-6.3,6.4H17.4c-3.5,0-6.3-2.9-6.3-6.4V6.8
c0-0.5-0.3-0.8-0.8-0.8H8.7C6.1,6,4,8.2,4,10.8v34.4C4,47.8,6.1,50,8.7,50h34.6c2.6,0,4.7-2.2,4.7-4.8V10.8C48,8.2,45.9,6,43.3,6z"
/>
</g></svg
></a>
</g>
</svg>
</a>
</h2>
<pre id="example">
&lt;!DOCTYPE html&gt;