File tree Expand file tree Collapse file tree 2 files changed +22
-6
lines changed Expand file tree Collapse file tree 2 files changed +22
-6
lines changed Original file line number Diff line number Diff line change 41
41
echo 'RefName: ${{ github.ref_name }}'
42
42
echo 'RefType: ${{ github.ref_type }}'
43
43
44
+ - name : Check if `Release`
45
+ id : check_release
46
+ if : >-
47
+ github.event_name == 'release' &&
48
+ matrix.node == '12.x' &&
49
+ matrix.os == 'ubuntu-latest'
50
+ run : |
51
+ echo "::set-output name=release::true"
52
+
44
53
- name : Checkout repo
45
54
uses : actions/checkout@v2
46
55
@@ -73,11 +82,18 @@ jobs:
73
82
run : yarn build
74
83
working-directory : example
75
84
85
+ # Setup .npmrc file to publish to GitHub Packages
86
+ - name : Setup Publish
87
+ if : ${{ steps.check_release.outputs.release == 'true' }}
88
+ uses : actions/setup-node@v3
89
+ with :
90
+ registry-url : ' https://npm.pkg.github.com'
91
+
76
92
- name : Publish
77
- if : >-
78
- github.event_name == 'release' &&
79
- matrix.node == '12.x' &&
80
- matrix.os == 'ubuntu-latest'
81
- # if: ${{ github.event_name == 'pull_request' && matrix.node == '12.x' && matrix.os == 'ubuntu-latest' }}
93
+ if : ${{ steps.check_release.outputs.release == 'true' }}
94
+ # run: yarn publish
82
95
run : |
83
96
echo 'Under Publish'
97
+ cat .npmrc
98
+ env :
99
+ NODE_AUTH_TOKEN : ${{ env.GIT_PKG_PUBLISH_TOKEN }}
Original file line number Diff line number Diff line change 7
7
" .vscode" ,
8
8
" .vscode-insiders"
9
9
],
10
- "cSpell.words" : [" bahmutov" ]
10
+ "cSpell.words" : [" bahmutov" , " npmrc " ]
11
11
}
You can’t perform that action at this time.
0 commit comments