@@ -3,9 +3,6 @@ name: Publish
33on :
44 workflow_dispatch :
55 inputs :
6- packageName :
7- description : Which package to publish
8- required : true
96 semanticVersion :
107 description : ' Semantic Version [major | minor | patch ]'
118 required : true
2219 with :
2320 token : ${{ secrets.ADMIN_TOKEN }}
2421 ref : ' master'
22+ # pulls all commits (needed for lerna / semantic release to correctly version)
23+ fetch-depth : ' 0'
2524
2625 - uses : actions/setup-node@v1
2726 with :
@@ -33,26 +32,21 @@ jobs:
3332 git config --global user.name '@aspecto-system'
3433 git config --global user.email '[email protected] ' 3534
36- - name : Install node modules
37- run : yarn --cwd packages/${{ github.event.inputs.packageName }}
35+ - name : Install Packages
36+ run : yarn install
3837
39- - name : Bump Version
38+ - name : Authenticate with Registry
4039 run : |
41- yarn config set version-git-message "chore(release ${{ github.event.inputs.packageName }}) - publish v%s"
42- yarn --cwd packages/${{ github.event.inputs.packageName }} version --${{ github.event.inputs.semanticVersion }} --no-commit-hooks
43- node version-update.js ${{ github.event.inputs.packageName }}
44-
45- - name : Build
46- run : yarn --cwd packages/${{ github.event.inputs.packageName }} build
47-
48- - name : Publish to NPM
49- run : yarn --cwd packages/${{ github.event.inputs.packageName }} publish
40+ yarn logout
41+ echo "registry=http://registry.npmjs.org/" >> .npmrc
42+ echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
43+ npm whoami
5044 env :
51- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
45+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
5246
53- - name : Push Changes
47+ - name : Publish package
5448 run : |
55- git add .
56- git commit --amend --no-edit
57- git push
49+ yarn publish:ci ${{ github.event.inputs.semanticVersion }}
50+ env :
51+ GH_TOKEN : ${{ secrets.ADMIN_TOKEN }}
5852
0 commit comments