@@ -2,42 +2,68 @@ name: Publish
22
33on :
44 workflow_call :
5+ secrets :
6+ OAUTH_CLIENT_ID :
7+ required : true
8+ # Signing certificates
9+ CSC_LINK :
10+ required : true
11+ WIN_CSC_LINK :
12+ required : true
13+ CSC_KEY_PASSWORD :
14+ required : true
15+ WIN_CSC_KEY_PASSWORD :
16+ required : true
17+ # macOS specific
18+ APPLE_ID_USERNAME :
19+ required : true
20+ APPLE_ID_PASSWORD :
21+ required : true
22+ APPLE_ID_TEAM_ID :
23+ required : true
524 workflow_dispatch : # For manually running release process to verify code-signing of artifacts
625
7- permissions :
8- contents : write
26+ permissions : {}
927
1028jobs :
1129 prepare :
1230 name : Prepare draft release
1331 runs-on : ubuntu-latest
32+ permissions :
33+ contents : write
1434 steps :
1535 - name : Checkout
1636 uses : actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98
37+ with :
38+ persist-credentials : false
1739
1840 - name : Parse release branch
1941 if : startsWith(github.ref, 'refs/heads/release/')
2042 run : |
2143 # Extract the branch name (e.g. release/v1.2.3[-meta])
2244 ref=${GITHUB_REF#refs/heads/}
23- echo "RELEASE_BRANCH=$ref" >> $GITHUB_ENV
45+ echo "RELEASE_BRANCH=$ref" >> " $GITHUB_ENV"
2446 # Also export a RELEASE_TAG by removing the `release/` prefix (keeps leading 'v')
2547 tag=${ref#release/}
26- echo "RELEASE_TAG=$tag" >> $GITHUB_ENV
48+ echo "RELEASE_TAG=$tag" >> " $GITHUB_ENV"
2749 shell : bash
2850
2951 - name : Create draft release
30- uses : softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
31- with :
32- name : " ${{ env.RELEASE_TAG }}"
33- tag_name : " ${{ env.RELEASE_TAG }}"
34- draft : true
35- body : ' # <img src="https://github.com/gitify-app/gitify/blob/3554605d32a6c08a3d4ec17b02b90e2dd276a152/assets/images/tray-active%402x.png" /> Gitify ${{ env.RELEASE_TAG }}'
36- generate_release_notes : true
52+ run : |
53+ gh release create "${RELEASE_TAG}" \
54+ --title "${RELEASE_TAG}" \
55+ --draft \
56+ --notes "# <img src=\"https://github.com/gitify-app/gitify/blob/3554605d32a6c08a3d4ec17b02b90e2dd276a152/assets/images/tray-active%402x.png\" /> Gitify ${RELEASE_TAG}" \
57+ --generate-notes
58+ env :
59+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
60+ RELEASE_TAG : ${{ env.RELEASE_TAG }}
3761
3862 release :
39- name : Publish ${{ matrix.platform }} ( electron-builder)
63+ name : Publish ${{ matrix.platform }} [ electron-builder]
4064 needs : prepare
65+ permissions :
66+ contents : write
4167 strategy :
4268 matrix :
4369 include :
6187 steps :
6288 - name : Checkout
6389 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
90+ with :
91+ persist-credentials : false
6492
6593 - name : Setup Node.js
6694 uses : ./.github/actions/setup-node
0 commit comments