44 workflow_call :
55 inputs :
66 node_version :
7- description : ' Node.js version to use'
8- default : ' 22 '
7+ description : " Node.js version to use"
8+ default : " 22 "
99 type : string
1010 build :
11- description : ' Whether to build'
11+ description : " Whether to build"
1212 required : false
1313 default : true
1414 type : boolean
1515 publish :
16- description : ' Whether to publish'
16+ description : " Whether to publish"
1717 required : false
1818 default : true
1919 type : boolean
2020 publish_chocolatey :
21- description : ' Whether to publish to Chocolatey'
21+ description : " Whether to publish to Chocolatey"
2222 required : false
2323 default : true
2424 type : boolean
25+ secrets :
26+ apple_api_key :
27+ description : " Apple API key for macOS notarization"
28+ required : true
29+ apple_api_key_id :
30+ description : " Apple API key ID for macOS notarization"
31+ required : true
32+ apple_id :
33+ description : " Apple ID for macOS notarization"
34+ required : true
35+ apple_id_password :
36+ description : " Apple ID password for macOS notarization"
37+ required : true
38+ apple_team_id :
39+ description : " Apple Team ID for macOS notarization"
40+ required : true
41+ chocolatey_api_key :
42+ description : " Chocolatey API key for publishing"
43+ required : true
44+ mac_certs :
45+ description : " macOS code signing certificates (base64 encoded)"
46+ required : true
47+ mac_certs_password :
48+ description : " Password for macOS code signing certificates"
49+ required : true
50+ sentry_auth_token :
51+ description : " Sentry auth token for uploading source maps"
52+ required : true
53+ sentry_org :
54+ description : " Sentry organization"
55+ required : true
56+ sentry_project :
57+ description : " Sentry project"
58+ required : true
59+ snapcraft_store_credentials :
60+ description : " Snapcraft store credentials for Snap Store publishing"
61+ required : true
2562 outputs :
2663 # Map the workflow output(s) to job output(s)
2764 version :
28- description : ' Built/published version from the workflow'
65+ description : " Built/published version from the workflow"
2966 value : ${{ jobs.electron.outputs.version }}
3067 workflow_dispatch :
3168 inputs :
3269 node_version :
33- description : ' Node.js version to use'
34- default : ' 22 '
70+ description : " Node.js version to use"
71+ default : " 22 "
3572 type : string
3673 build :
37- description : ' Whether to build'
74+ description : " Whether to build"
3875 required : false
3976 default : true
4077 type : boolean
4178 publish :
42- description : ' Whether to publish'
79+ description : " Whether to publish"
4380 required : false
4481 default : true
4582 type : boolean
4683 publish_chocolatey :
47- description : ' Whether to publish to Chocolatey'
84+ description : " Whether to publish to Chocolatey"
4885 required : false
4986 default : true
5087 type : boolean
5188
89+ permissions : {}
90+
5291jobs :
5392 electron :
5493 strategy :
@@ -59,26 +98,28 @@ jobs:
5998 outputs :
6099 version : ${{ steps.getversion.outputs.version }}
61100 steps :
62- - uses : actions/checkout@v4
63- - uses : pnpm/action-setup@v4
101+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
102+ with :
103+ persist-credentials : false
104+ - uses : pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
64105 - name : Use Node.js ${{ inputs.node_version }} on ${{ matrix.os }}
65- uses : actions/setup-node@v4
106+ uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
66107 with :
67108 node-version : ${{ inputs.node_version }}
68- cache : ' pnpm'
69- - uses : maxim-lobanov/setup-xcode@v1
109+ cache : " pnpm"
110+ - uses : maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
70111 if : startsWith(matrix.os, 'macos')
71112 with :
72113 xcode-version : latest-stable
73114 - run : pnpm i --frozen-lockfile
74- - uses : nick-invision/retry@v2
115+ - uses : nick-invision/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 # v2.9.0
75116 with :
76117 timeout_minutes : 20
77118 max_attempts : 3
78119 command : pnpm build:ci
79120 # Update .npmrc file to support electron builder
80121 # https://www.electron.build/#note-for-pnpm
81- - uses : nodef/npm-config.action@v1.0.0
122+ - uses : nodef/npm-config.action@d886ec78e341a72863181caf1c2d3c10b6a776d2 # v1.0.0
82123 with :
83124 path : .npmrc # Path to the .npmrc file
84125 reset : false
@@ -90,10 +131,10 @@ jobs:
90131 - run : pnpm deploy --filter=altair out/elx-files
91132
92133 - name : Install Snapcraft
93- uses : samuelmeuli/action-snapcraft@v2
134+ uses : samuelmeuli/action-snapcraft@d33c176a9b784876d966f80fb1b461808edc0641 # v2.1.1
94135 if : startsWith(matrix.os, 'ubuntu')
95136 env :
96- SNAPCRAFT_TOKEN : ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
137+ SNAPCRAFT_TOKEN : ${{ secrets.snapcraft_store_credentials }}
97138
98139 - name : Prepare for app notarization
99140 if : startsWith(matrix.os, 'macos')
@@ -122,7 +163,7 @@ jobs:
122163 # disable for macos not in master branch, because code signing is skipped in pull requests
123164 if : ${{ inputs.publish || !(startsWith(matrix.os, 'macos') && github.ref != 'refs/heads/master') }}
124165 id : build-electron
125- uses : paneron/action-electron-builder@v1.8.1
166+ uses : paneron/action-electron-builder@14b133702d1b2e9749912051c43ed62b4afe56c8 # v1.8.1
126167 with :
127168 github_token : ${{ secrets.github_token }}
128169 package_root : out/elx-files/
@@ -136,12 +177,12 @@ jobs:
136177 env :
137178 # macOS notarization API key
138179 # https://www.codiga.io/blog/notarize-sign-electron-app/
139- APPLE_ID : ${{ secrets.APPLE_ID }}
140- APPLE_ID_PASSWORD : ${{ secrets.APPLE_ID_PASSWORD }}
141- APPLEIDPASS : ${{ secrets.APPLE_ID_PASSWORD }}
142- APPLE_TEAM_ID : ${{ secrets.APPLE_TEAM_ID }}
143- SNAPCRAFT_STORE_CREDENTIALS : ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
144- DEBUG : ' @malept/flatpak-bundler'
180+ APPLE_ID : ${{ secrets.apple_id }}
181+ APPLE_ID_PASSWORD : ${{ secrets.apple_id_password }}
182+ APPLEIDPASS : ${{ secrets.apple_id_password }}
183+ APPLE_TEAM_ID : ${{ secrets.apple_team_id }}
184+ SNAPCRAFT_STORE_CREDENTIALS : ${{ secrets.snapcraft_store_credentials }}
185+ DEBUG : " @malept/flatpak-bundler"
145186
146187 # chocolatey
147188 - name : Read VERSION file
@@ -154,11 +195,11 @@ jobs:
154195 echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT
155196 - name : Add mask
156197 run : |
157- echo "::add-mask::${{ secrets.CHOCOLATEY_API_KEY }}"
198+ echo "::add-mask::${{ secrets.chocolatey_api_key }}"
158199 - name : chocolatey pack
159200 if : startsWith(matrix.os, 'windows')
160201 continue-on-error : true
161- uses : crazy-max/ghaction-chocolatey@v3
202+ uses : crazy-max/ghaction-chocolatey@2526f467ccbd337d307fe179959cabbeca0bc8c0 # v3.4.0
162203 with :
163204 args : pack chocolatey\altair-graphql.nuspec
164205 # - name: chocolatey install (test choco packaging)
@@ -172,39 +213,39 @@ jobs:
172213 - name : chocolatey push
173214 if : ${{ startsWith(matrix.os, 'windows') && inputs.publish_chocolatey && inputs.publish }}
174215 continue-on-error : true
175- uses : crazy-max/ghaction-chocolatey@v3
216+ uses : crazy-max/ghaction-chocolatey@2526f467ccbd337d307fe179959cabbeca0bc8c0 # v3.4.0
176217 with :
177- args : push altair-graphql.${{ steps.getversion.outputs.version }}.nupkg -s https://push.chocolatey.org/ -k="'${{ secrets.CHOCOLATEY_API_KEY }}'"
218+ args : push altair-graphql.${{ steps.getversion.outputs.version }}.nupkg -s https://push.chocolatey.org/ -k="'${{ secrets.chocolatey_api_key }}'"
178219
179220 - name : Upload source maps to Sentry (app)
180221 if : startsWith(matrix.os, 'ubuntu') && env.SENTRY_ORG
181- uses : getsentry/action-release@v1
222+ uses : getsentry/action-release@a74facf8a080ecbdf1cb355f16743530d712abb7 # v1.11.0
182223 env :
183- SENTRY_AUTH_TOKEN : ${{ secrets.SENTRY_AUTH_TOKEN }}
184- SENTRY_ORG : ${{ secrets.SENTRY_ORG }}
185- SENTRY_PROJECT : ${{ secrets.SENTRY_PROJECT }}
224+ SENTRY_AUTH_TOKEN : ${{ secrets.sentry_auth_token }}
225+ SENTRY_ORG : ${{ secrets.sentry_org }}
226+ SENTRY_PROJECT : ${{ secrets.sentry_project }}
186227 with :
187228 environment : ${{ inputs.publish && 'production' || '' }}
188229 sourcemaps : packages/altair-app/dist/
189230 version : ${{ inputs.publish && steps.getversion.outputs.version || '' }}
190- url_prefix : ' altair://-'
231+ url_prefix : " altair://-"
191232 finalize : false
192233 - name : Upload source maps to Sentry (electron)
193234 if : startsWith(matrix.os, 'ubuntu') && env.SENTRY_ORG
194- uses : getsentry/action-release@v1
235+ uses : getsentry/action-release@a74facf8a080ecbdf1cb355f16743530d712abb7 # v1.11.0
195236 env :
196- SENTRY_AUTH_TOKEN : ${{ secrets.SENTRY_AUTH_TOKEN }}
197- SENTRY_ORG : ${{ secrets.SENTRY_ORG }}
198- SENTRY_PROJECT : ${{ secrets.SENTRY_PROJECT }}
237+ SENTRY_AUTH_TOKEN : ${{ secrets.sentry_auth_token }}
238+ SENTRY_ORG : ${{ secrets.sentry_org }}
239+ SENTRY_PROJECT : ${{ secrets.sentry_project }}
199240 with :
200241 environment : ${{ inputs.publish && 'production' || '' }}
201242 sourcemaps : out/elx-files/dist/
202243 version : ${{ inputs.publish && steps.getversion.outputs.version || '' }}
203- url_prefix : ' app:///dist'
244+ url_prefix : " app:///dist"
204245
205246 - name : Upload electron builds
206247 if : always()
207- uses : actions/upload-artifact@v4
248+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
208249 with :
209250 name : electron-builds-${{ matrix.os }}
210251 path : out/elx-files/out/**
0 commit comments