@@ -17,27 +17,46 @@ jobs:
1717 name : Release
1818 runs-on : ubuntu-latest
1919 permissions :
20+ actions : read
21+ checks : read
2022 contents : write
23+ id-token : write
2124 issues : write
25+ pull-requests : read
26+ security-events : write
27+ strategy :
28+ fail-fast : false
29+ matrix :
30+ language : [javascript, typescript]
2231 steps :
2332
33+ - name : Harden Runner # Audit all outbound calls
34+ uses : step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
35+ with :
36+ egress-policy : audit
37+
2438 - name : Checkout
25- uses : actions/checkout@v4
39+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2640 with :
2741 fetch-depth : 0
2842 persist-credentials : false
2943 token : ${{ secrets.TOKEN }}
3044
3145 - name : Import GPG
32- uses : crazy-max/ghaction-import-gpg@v6
46+ uses : crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0
3347 with :
3448 gpg_private_key : ${{ secrets.GPG_PRIVATE_KEY }}
3549 passphrase : ${{ secrets.PASSPHRASE }}
3650 git_user_signingkey : true
3751 git_commit_gpgsign : true
3852
53+ - name : Initialize CodeQL
54+ uses : github/codeql-action/init@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
55+ with :
56+ languages : ${{ matrix.language }}
57+
3958 - name : Setup Node
40- uses : actions/setup-node@v4
59+ uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
4160 with :
4261 node-version : " lts/*"
4362
4766 - name : Build Source Code
4867 run : npm run build
4968
69+ - name : Run Test and Generate Coverage
70+ run : npm test
71+
72+ - name : Upload Coverage Reports to Codecov
73+ uses : codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2
74+ with :
75+ token : ${{ secrets.CODECOV_TOKEN }}
76+
77+ - name : Analyze CodeQL
78+ uses : github/codeql-action/analyze@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
79+ with :
80+ category : /language:${{ matrix.language }}
81+
82+ - name : Analyze OSSF Scorecard
83+ uses : ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
84+ with :
85+ results_file : ossf_scorecard.sarif
86+ results_format : sarif
87+ publish_results : true
88+ repo_token : ${{ secrets.TOKEN }}
89+
90+ - name : Upload to GitHub Actions Artifact
91+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
92+ with :
93+ name : OSSF Scorecard
94+ path : ossf_scorecard.sarif
95+ overwrite : true
96+
97+ - name : Upload to GitHub Code Scanning
98+ uses : github/codeql-action/upload-sarif@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
99+ with :
100+ sarif_file : ossf_scorecard.sarif
101+
50102 - name : Release and Publish to NPM
51103 env :
52104 GIT_AUTHOR_NAME : ${{ vars.GIT_AUTHOR_NAME }}
61113 run : |
62114 git checkout dev
63115 git pull --rebase origin main
64- git push --force origin dev
116+ git push --force origin dev
0 commit comments