-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f058c8a
commit 6815790
Showing
6 changed files
with
51 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,15 +31,37 @@ jobs: | |
env: | ||
CI: true | ||
|
||
- name: Publish package | ||
uses: JS-DevTools/npm-publish@v1 | ||
id: publish | ||
- name: Build bundle | ||
run: yarn build | ||
|
||
- name: Set version from release | ||
uses: reedyuk/[email protected] | ||
with: | ||
version: ${{ steps.version.outputs.tag }} | ||
git-tag-version: false | ||
package: 'dist/' | ||
|
||
- name: Create NPM config | ||
working-directory: './dist/' | ||
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Check for NEXT tag | ||
id: next | ||
uses: actions-ecosystem/action-regex-match@v2 | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} | ||
check-version: true | ||
access: 'public' | ||
|
||
# log results | ||
- if: steps.publish.outputs.type != 'none' | ||
run: | | ||
echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}" | ||
text: ${{ steps.version.outputs.tag }} | ||
regex: 'next' | ||
|
||
- name: Publish package with NEXT tag | ||
if: ${{ steps.next.outputs.match != '' }} | ||
working-directory: './dist/' | ||
run: npm publish --tag next | ||
|
||
- name: Publish package to latest | ||
if: ${{ steps.next.outputs.match == '' }} | ||
working-directory: './dist/' | ||
run: npm publish | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters