File tree Expand file tree Collapse file tree 10 files changed +5152
-0
lines changed
Expand file tree Collapse file tree 10 files changed +5152
-0
lines changed Original file line number Diff line number Diff line change 1+ * @ electron/wg-infra
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ permissions : {}
9+
10+ jobs :
11+ release :
12+ name : release
13+ runs-on : ubuntu-latest
14+ if : github.ref == 'refs/heads/main'
15+ permissions :
16+ contents : write
17+ steps :
18+ - name : Checkout
19+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
20+ - name : Setup Node.js
21+ uses : actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
22+ with :
23+ node-version : 24.10.0
24+ - run : yarn install --immutable
25+ - run : yarn semantic-release
26+ env :
27+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ # Yarn internal state
2+ .yarn /install-state.gz
3+
4+ node_modules
Original file line number Diff line number Diff line change 1+ {
2+ "plugins" : [
3+ " @semantic-release/commit-analyzer" ,
4+ " @semantic-release/release-notes-generator" ,
5+ " @semantic-release/github"
6+ ],
7+ "branches" : [ " main" ]
8+ }
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 1+ enableScripts : false
2+
3+ nodeLinker : node-modules
4+
5+ # TODO - Bump this to 7 days once semantic-release 25.0.1 has been out that long
6+ npmMinimalAgeGate : 2880
7+
8+ npmPreapprovedPackages :
9+ - " @electron/*"
10+
11+ yarnPath : .yarn/releases/yarn-4.10.3.cjs
Original file line number Diff line number Diff line change 1+ # Semantic Trusted Release GitHub Action
2+
3+ > Trusted publishing via Semantic Release in a simple action
4+
5+ ## Example
6+
7+ ``` yaml
8+ name : Publish
9+
10+ on : [push]
11+
12+ permissions :
13+ id-token : write # for publishing releases
14+ contents : write # for making github release
15+ pull-requests : write # for commenting release version
16+ issues : write # for commenting release version
17+
18+ jobs :
19+ build :
20+ runs-on : ubuntu-latest
21+ environment : npm
22+ steps :
23+ # For security please pin this to the SHA of the latest release
24+ # - https://github.com/actions/checkout/releases/latest
25+ - uses : actions/checkout@{sha}
26+ with :
27+ # This is key, ensure that you set this on your checkout
28+ persist-credentials : false
29+ # For security please pin this to the SHA of the latest release
30+ # - https://github.com/electron/semantic-trusted-release/releases/latest
31+ - uses : electron/semantic-trusted-release@{sha}
32+ with :
33+ github-token : ${{ secrets.GITHUB_TOKEN }}
34+ ` ` `
Original file line number Diff line number Diff line change 1+ name : Semantic Trusted Release Action
2+ description : Publish a semantic release npm package via trusted publishing
3+
4+ inputs :
5+ github-token :
6+ description : GitHub app installation token to use with semantic-release
7+ required : true
8+
9+ runs :
10+ using : " composite"
11+ env :
12+ DIR : /tmp/semantic-release-packages
13+ steps :
14+ - name : Setup Node.js
15+ uses : actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
16+ with :
17+ node-version : 24.10.0
18+
19+ - name : Set up publishing environment
20+ run : |
21+ mkdir $DIR
22+ cp ${{ github.action_path }}/package.json $DIR/package.json
23+ cp -r ${{ github.action_path }}/.yarn $DIR/.yarn
24+ cp ${{ github.action_path }}/.yarnrc.yml $DIR/.yarnrc.yml
25+ cp ${{ github.action_path }}/yarn.lock $DIR/yarn.lock
26+ cd $DIR
27+ yarn install --immutable
28+ echo "$DIR/node_modules/.bin" >> "$GITHUB_PATH"
29+ shell : bash
30+
31+ - name : Run semantic release
32+ run : $DIR/node_modules/.bin/semantic-release
33+ shell : bash
34+ env :
35+ GITHUB_ACTION : 1
36+ GITHUB_TOKEN : ${{ inputs.github-token }}
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " @electron/semantic-trusted-release" ,
3+ "private" : true ,
4+ "version" : " 0.0.0-development" ,
5+ "description" : " " ,
6+ "keywords" : [],
7+ "author" : " " ,
8+ "license" : " MIT" ,
9+ "dependencies" : {
10+ "semantic-release" : " ^25.0.1"
11+ },
12+ "packageManager" :
" [email protected] +sha512.c38cafb5c7bb273f3926d04e55e1d8c9dfa7d9c3ea1f36a4868fa028b9e5f72298f0b7f401ad5eb921749eb012eb1c3bb74bf7503df3ee43fd600d14a018266f" 13+ }
You can’t perform that action at this time.
0 commit comments