File tree Expand file tree Collapse file tree 8 files changed +2871
-4393
lines changed
Expand file tree Collapse file tree 8 files changed +2871
-4393
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Publish
2+
3+ # Trigger on tag push AND manual trigger
4+ on :
5+ push :
6+ tags :
7+ - " v*.*.*"
8+ workflow_dispatch : # Manual trigger
9+
10+ permissions :
11+ contents : read
12+ id-token : write # REQUIRED for trusted publishing (OIDC)
13+
14+ jobs :
15+ publish :
16+ runs-on : ubuntu-latest
17+ steps :
18+ - uses : actions/checkout@v4
19+
20+ - name : Setup Node.js
21+ uses : actions/setup-node@v4
22+ with :
23+ node-version : 20
24+ cache : " npm"
25+ registry-url : " https://registry.npmjs.org/"
26+
27+ - name : Read package name
28+ id : pkg
29+ run : |
30+ echo "NAME=$(jq -r '.name' package.json)" >> $GITHUB_ENV
31+
32+ - name : Decide publish method
33+ run : |
34+ if npm view "$NAME" > /dev/null 2>&1; then
35+ echo "EXISTS=true" >> $GITHUB_ENV
36+ echo "Package exists → using trusted publishing"
37+ else
38+ echo "EXISTS=false" >> $GITHUB_ENV
39+ echo "Package does not exist → bootstrap publish"
40+ fi
41+
42+ - name : Publish
43+ env :
44+ NPM_BOOTSTRAP_TOKEN : ${{ secrets.NPM_BOOTSTRAP_TOKEN }}
45+ run : |
46+ if [ "$EXISTS" = "false" ]; then
47+ echo "//registry.npmjs.org/:_authToken=${NPM_BOOTSTRAP_TOKEN}" > ~/.npmrc
48+ fi
49+
50+ npm publish --access public
51+
52+ if [ "$EXISTS" = "false" ]; then
53+ rm ~/.npmrc
54+ fi
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ const globals = require ( "globals" ) ;
2+ const js = require ( "@eslint/js" ) ;
3+
4+ module . exports = [
5+ js . configs . recommended ,
6+ {
7+ languageOptions : {
8+ globals : {
9+ ...globals . browser ,
10+ sap : "readonly" ,
11+ } ,
12+ ecmaVersion : 2023 ,
13+ sourceType : "script" ,
14+ } ,
15+ rules : {
16+ "prefer-const" : "warn" ,
17+ } ,
18+ } ,
19+ {
20+ ignores : [ "eslint.config.js" ] ,
21+ } ,
22+ ] ;
You can’t perform that action at this time.
0 commit comments