File tree Expand file tree Collapse file tree 5 files changed +46
-31
lines changed
Expand file tree Collapse file tree 5 files changed +46
-31
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,9 @@ inputs:
1010 folder :
1111 default : ' ./'
1212 description : ' A folder containing a package.json file.'
13- token :
14- description : ' The NPM authentication token required to publish.'
15-
1613 createRelease :
1714 description : ' Create a release on GitHub.'
1815 default : ' false'
19-
2016 ghToken :
2117 description : ' The GitHub authentication token required to create a release.'
2218
4945 run : npm run build
5046 shell : bash
5147 working-directory : ${{ inputs.working-directory }}
52- - name : Prepare NPM Token
53- run : echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
54- working-directory : ${{ inputs.working-directory }}
55- shell : bash
56- env :
57- NPM_TOKEN : ${{ inputs.token }}
5848 - name : Publish to NPM
5949 run : npm publish ${{ inputs.folder }} --tag ${{ inputs.tag }} --provenance
6050 shell : bash
Original file line number Diff line number Diff line change 1- name : ' Ionicons Dev Build '
1+ name : ' Dev Release '
22
33on :
4- workflow_dispatch :
4+ workflow_call :
55
66jobs :
77 create-dev-hash :
3333 tag : dev
3434 version : ${{ needs.create-dev-hash.outputs.dev-hash }}
3535 working-directory : ' ./'
36- token : ${{ secrets.NPM_TOKEN }}
3736 createRelease : ' false'
3837
3938 get-build :
Original file line number Diff line number Diff line change 1- name : ' Ionicons Production Release'
1+ name : ' Production Release'
22
33on :
4- workflow_dispatch :
4+ workflow_call :
55 inputs :
66 version :
7- required : true
8- type : choice
9- description : Which version should be published?
10- options :
11- - patch
12- - minor
13- - major
14- tag :
15- required : true
16- type : choice
17- description : Which npm tag should this be published to?
18- options :
19- - latest
7+ required : false
8+ type : string
9+ description : npm version (major, minor, or patch)
2010
2111jobs :
2212 release-ionicons :
3121 - name : Publish to NPM
3222 uses : ./.github/workflows/actions/publish-npm
3323 with :
34- tag : ${{ inputs.tag }}
24+ tag : latest
3525 version : ${{ inputs.version }}
3626 working-directory : ' ./'
37- token : ${{ secrets.NPM_TOKEN }}
3827 createRelease : true
3928 ghToken : ${{ secrets.IONITRON_TOKEN }}
Original file line number Diff line number Diff line change 1+ name : ' Release Orchestrator'
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ release-type :
7+ description : ' Release type'
8+ required : true
9+ type : choice
10+ options :
11+ - dev
12+ - production
13+ version :
14+ description : ' Version for production releases'
15+ required : false
16+ type : choice
17+ options :
18+ - patch
19+ - minor
20+ - major
21+
22+ permissions :
23+ id-token : write
24+ contents : read
25+
26+ jobs :
27+ run-dev :
28+ if : ${{ inputs.release-type == 'dev' }}
29+ uses : ./.github/workflows/dev-release.yml
30+ secrets : inherit
31+
32+ run-production :
33+ if : ${{ inputs.release-type == 'production' }}
34+ uses : ./.github/workflows/production-release.yml
35+ secrets : inherit
36+ with :
37+ version : ${{ inputs.version }}
Original file line number Diff line number Diff line change 1- name : ' Ionicons Build '
1+ name : ' Validation '
22
33on :
44 pull_request :
You can’t perform that action at this time.
0 commit comments