Skip to content

Commit 90ae3ce

Browse files
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>
1 parent 97f5922 commit 90ae3ce

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

.github/workflows/publish-release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,12 @@ jobs:
6060
- name: build offline
6161
run: npm run build:offline
6262

63+
- name: Rename offline.zip with version metadata
64+
run: mv ./dist/offline.zip ./dist/offline_${{ github.ref_name }}.zip
65+
6366
- name: Generate index.html in snapshot
6467
working-directory: .
65-
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
68+
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
6669

6770
- name: Generate release.tar from snapshot and put it in dist/
6871
working-directory: .
@@ -71,7 +74,7 @@ jobs:
7174
- name: Upload offline.zip to release
7275
env:
7376
GH_TOKEN: ${{ github.token }}
74-
run: gh release upload ${{ github.ref_name }} ./dist/offline.zip
77+
run: gh release upload ${{ github.ref_name }} ./dist/offline_${{ github.ref_name }}.zip
7578

7679
- name: Configure AWS credentials
7780
uses: aws-actions/configure-aws-credentials@v5

public/index.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ <h2>Files</h2>
8585
<li><a href="core.js">core.js</a></li>
8686
<li><a href="core.js.map">core.js.map</a></li>
8787
<li>
88-
<a href="offline.zip">offline.zip</a> (PyScript _VERSION_
89-
zipped up for offline use)
88+
<a href="offline__VERSION_.zip">offline__VERSION_.zip</a>
89+
(PyScript _VERSION_ zipped up for offline use)
9090
</li>
9191
</ul>
9292
<div id="out"></div>
@@ -125,8 +125,9 @@ <h2>
125125
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
126126
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"
127127
/>
128-
</g></svg
129-
></a>
128+
</g>
129+
</svg>
130+
</a>
130131
</h2>
131132
<pre id="example">
132133
&lt;!DOCTYPE html&gt;

0 commit comments

Comments
 (0)