File tree 4 files changed +36
-62
lines changed
4 files changed +36
-62
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish
2
+
3
+ # Allow to run this workflow manually from the Actions tab
4
+ on :
5
+ workflow_dispatch :
6
+ inputs :
7
+ package :
8
+ description : ' Package to publish'
9
+ type : string
10
+ required : true
11
+ default : ' mikel'
12
+ # # Set permissions to the github token
13
+ # # https://github.com/softprops/action-gh-release#permissions
14
+ permissions :
15
+ contents : write
16
+
17
+ jobs :
18
+ publish :
19
+ if : ${{ github.repository == 'jmjuanes/mikel' }}
20
+ runs-on : ubuntu-latest
21
+ steps :
22
+ - uses : actions/checkout@v4
23
+ - uses : actions/setup-node@v4
24
+ with :
25
+ node-version : 20
26
+ registry-url : ' https://registry.npmjs.org'
27
+ - name : Publish primary package
28
+ run : npm publish
29
+ if : ${{ inputs.package == 'mikel' }}
30
+ env :
31
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
32
+ - name : Publish secondary package
33
+ run : cd packages/${{ inputs.package }} && npm publish
34
+ if : ${{ inputs.package != 'mikel' }}
35
+ env :
36
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 18
18
- uses : softprops/action-gh-release@v2
19
19
with :
20
20
generate_release_notes : true
21
-
22
- publish :
23
- name : Publish
24
- if : ${{ github.repository == 'jmjuanes/mikel' }}
25
- runs-on : ubuntu-latest
26
- steps :
27
- - uses : actions/checkout@v4
28
- - uses : actions/setup-node@v4
29
- with :
30
- node-version : 20
31
- registry-url : ' https://registry.npmjs.org'
32
- - run : npm publish
33
- env :
34
- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
35
-
36
- publish-packages :
37
- name : Publish packages
38
- if : ${{ github.repository == 'jmjuanes/mikel' }}
39
- runs-on : ubuntu-latest
40
- strategy :
41
- matrix :
42
- package : [mikel-webpack-plugin]
43
- steps :
44
- - uses : actions/checkout@v4
45
- - uses : actions/setup-node@v4
46
- with :
47
- node-version : 20
48
- registry-url : ' https://registry.npmjs.org'
49
- - run : yarn release
50
- - run : cd packages/${{ matrix.package }} && npm publish
51
- env :
52
- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 17
17
"./package.json" : " ./package.json"
18
18
},
19
19
"scripts" : {
20
- "release" : " node scripts/release.js" ,
21
20
"test" : " node test.js"
22
21
},
23
22
"keywords" : [
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments