@@ -172,20 +172,24 @@ jobs:
172172
173173 - name : Bump versions
174174 shell : bash
175- run : node scripts/bump-versions.mjs ${{ steps.version .outputs.version }}
175+ run : node scripts/bump-versions.mjs ${{ needs.preflight .outputs.version }}
176176
177- - name : Commit package.json
177+ - name : Configure git
178178 shell : bash
179179 env :
180180 GH_TOKEN : ${{ secrets.GH_TOKEN }}
181181 run : |
182- set -e
183- set -o pipefail
184182 git config user.name "github-actions[bot]"
185183 git config user.email "github-actions[bot]@users.noreply.github.com"
186184 git remote set-url origin https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git
185+
186+ - name : Commit package.json
187+ shell : bash
188+ run : |
189+ set -e
190+ set -o pipefail
187191 git add package.json
188- git commit -m "v${{ steps.version .outputs.version }}"
192+ git commit -m "v${{ needs.preflight .outputs.version }}"
189193 git push origin main
190194
191195 - name : Get package.json info
@@ -213,11 +217,11 @@ jobs:
213217 timeout-minutes : 5
214218 run : |
215219 sleep 10
216- while ! pnpm view ${{ steps.get-package-info.outputs.name }}@${{ steps.version .outputs.version }} > /dev/null 2>&1; do
217- echo "Waiting for npm to publish ${{ steps.get-package-info.outputs.name }}@${{ steps.version .outputs.version }}..."
220+ while ! pnpm view ${{ steps.get-package-info.outputs.name }}@${{ needs.preflight .outputs.version }} > /dev/null 2>&1; do
221+ echo "Waiting for npm to publish ${{ steps.get-package-info.outputs.name }}@${{ needs.preflight .outputs.version }}..."
218222 sleep 10
219223 done
220- echo "npm has published ${{ steps.get-package-info.outputs.name }}@${{ steps.version .outputs.version }}"
224+ echo "npm has published ${{ steps.get-package-info.outputs.name }}@${{ needs.preflight .outputs.version }}"
221225
222226 - name : Update pnpm-lock.yaml
223227 env :
@@ -227,14 +231,9 @@ jobs:
227231
228232 - name : Commit pnpm-lock.yaml
229233 shell : bash
230- env :
231- GH_TOKEN : ${{ secrets.GH_TOKEN }}
232234 run : |
233- git config user.name "github-actions[bot]"
234- git config user.email "github-actions[bot]@users.noreply.github.com"
235- git remote set-url origin https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git
236235 git add pnpm-lock.yaml
237- git commit -m "chore(package): update pnpm-lock.yaml after publishing ${{ steps.version .outputs.version }}"
236+ git commit -m "chore(package): update pnpm-lock.yaml after publishing ${{ needs.preflight .outputs.version }}"
238237 git push origin main
239238
240239 - name : Send Slack notification
@@ -245,20 +244,20 @@ jobs:
245244 payload : |
246245 {
247246 "channel": "${{ secrets.SLACK_CHANNEL_ID }}",
248- "text": "Published ${{ steps.get-package-info.outputs.name }}@${{ steps.version .outputs.version }}",
247+ "text": "Published ${{ steps.get-package-info.outputs.name }}@${{ needs.preflight .outputs.version }}",
249248 "blocks": [
250249 {
251250 "type": "header",
252251 "text": {
253252 "type": "plain_text",
254- "text": "Published ${{ steps.get-package-info.outputs.name }}@${{ steps.version .outputs.version }}"
253+ "text": "Published ${{ steps.get-package-info.outputs.name }}@${{ needs.preflight .outputs.version }}"
255254 }
256255 },
257256 {
258257 "type": "section",
259258 "text": {
260259 "type": "mrkdwn",
261- "text": "https://github.com/HarperFast/rocksdb-prebuilds/releases/tag/v${{ steps.version .outputs.version }}"
260+ "text": "https://github.com/HarperFast/rocksdb-prebuilds/releases/tag/v${{ needs.preflight .outputs.version }}"
262261 }
263262 }
264263 ]
0 commit comments