6666 with :
6767 python-version : ' 3.11'
6868
69+ - name : Write VERSION from tag/input (if provided)
70+ shell : bash
71+ run : |
72+ set -euo pipefail
73+ DIR="${{ steps.wd.outputs.dir }}"
74+ TAG=""
75+ if [[ "${{ startsWith(github.ref, 'refs/tags/') }}" == "true" ]]; then
76+ TAG="${{ github.ref_name }}"
77+ elif [[ -n "${{ inputs.tag }}" ]]; then
78+ TAG="${{ inputs.tag }}"
79+ fi
80+ if [[ -n "$TAG" ]]; then
81+ VER="${TAG#v}"
82+ echo "$VER" > "$DIR/VERSION"
83+ echo "VERSION=$VER";
84+ else
85+ echo "No tag/input provided; keeping existing VERSION file if present.";
86+ fi
87+
6988 - name : Cache pip
7089 uses : actions/cache@v4
7190 with :
@@ -115,6 +134,11 @@ jobs:
115134 run : |
116135 ditto -c -k --sequesterRsrc --keepParent PackyCode.app PackyCode-macOS.zip
117136
137+ - name : Generate SHA256
138+ working-directory : ${{ steps.wd.outputs.dir }}/dist
139+ run : |
140+ shasum -a 256 PackyCode-macOS.zip > PackyCode-macOS.zip.sha256
141+
118142 - name : Prepare release metadata
119143 id : relmeta
120144 run : |
@@ -134,6 +158,7 @@ jobs:
134158 name : PackyCode-macOS
135159 path : |
136160 ${{ steps.wd.outputs.dir }}/dist/PackyCode-macOS.zip
161+ ${{ steps.wd.outputs.dir }}/dist/PackyCode-macOS.zip.sha256
137162
138163 - name : Publish GitHub Release
139164 if : inputs.publish == 'true' || startsWith(github.ref, 'refs/tags/')
@@ -143,6 +168,7 @@ jobs:
143168 name : ${{ inputs.release_name != '' && inputs.release_name || env.REL_TAG }}
144169 files : |
145170 ${{ steps.wd.outputs.dir }}/dist/PackyCode-macOS.zip
171+ ${{ steps.wd.outputs.dir }}/dist/PackyCode-macOS.zip.sha256
146172 target_commitish : ${{ github.sha }}
147173 generate_release_notes : true
148174 make_latest : ${{ inputs.make_latest != '' && inputs.make_latest || 'true' }}
0 commit comments