File tree Expand file tree Collapse file tree 3 files changed +52
-4
lines changed
Expand file tree Collapse file tree 3 files changed +52
-4
lines changed Original file line number Diff line number Diff line change 1+ * coveooss/dev-tooling
Original file line number Diff line number Diff line change 33 push :
44 branches : [ main ]
55
6+ # default: least privileged permissions across all jobs
67permissions :
7- contents : write
8+ contents : read
89
910jobs :
1011 semantic-release :
1112 environment : production
1213 runs-on : [ ubuntu-latest ]
14+ permissions :
15+ contents : write
1316 steps :
1417 - name : Harden Runner
1518 uses : step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf # v2.11.1
3134 shell : bash
3235 env :
3336 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34- PYPI_TOKEN : ${{ secrets.PYPI_TOKEN }}
37+ id : release
3538 run : npx semantic-release
39+
40+ - name : Upload | Distribution Artifacts
41+ uses : actions/upload-artifact@v4
42+ with :
43+ name : distribution-artifacts
44+ path : dist
45+ if-no-files-found : error
46+
47+ outputs :
48+ released : ${{ steps.release.conclusion == "success" || 'false' }}
49+
50+ deploy :
51+ # 1. Separate out the deploy step from the publish step to run each step at
52+ # the least amount of token privilege
53+ # 2. Also, deployments can fail, and its better to have a separate job if you need to retry
54+ # and it won't require reversing the release.
55+ runs-on : ubuntu-latest
56+ needs : release
57+ if : ${{ needs.release.outputs.released == 'true' }}
58+ permissions :
59+ contents : read
60+ id-token : write
61+ environment :
62+ name : pypi
63+ url : https://pypi.org/project/json-schema-for-humans/
64+
65+ steps :
66+ - name : Setup | Download Build Artifacts
67+ uses : actions/download-artifact@v4
68+ id : artifact-download
69+ with :
70+ name : distribution-artifacts
71+ path : dist
72+
73+ - name : Publish to pypi
74+ uses : pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
75+
76+ with :
77+ print-hash : true
Original file line number Diff line number Diff line change 1414 "preset" : " conventionalcommits"
1515 }
1616 ],
17- " semantic-release-pypi"
17+ [
18+ " semantic-release-pypi" ,
19+ {
20+ "pypiPublish" : false
21+ }
22+ ]
1823 ]
19- }
24+ }
You can’t perform that action at this time.
0 commit comments