-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Minor renaming and add publish.yml
- Loading branch information
Showing
4 changed files
with
79 additions
and
104 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: publish | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- '*' | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
name: ${{ matrix.os }} ${{ matrix.target }} | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 120 | ||
strategy: | ||
matrix: | ||
os: [ubuntu-18.04] | ||
target: [13.x] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup node@${{ matrix.target }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.target }} | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: List versions | ||
run: | | ||
node -v && npm -v && which npm | ||
- name: Install dependencies | ||
run: | | ||
npm ci --quiet | ||
- name: Publish to npm (RC) | ||
if: contains(github.ref, '-rc') == true | ||
run: | | ||
npm config list | ||
npm publish . --tag=next | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Publish to npm | ||
if: contains(github.ref, '-rc') == false | ||
run: | | ||
npm config list | ||
npm publish . | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
# See https://github.com/actions/setup-node/issues/73. | ||
# - name: Setup node@${{ matrix.target }} | ||
# uses: actions/setup-node@v1 | ||
# with: | ||
# node-version: ${{ matrix.target }} | ||
# registry-url: 'https://npm.pkg.github.com/' | ||
# scope: '@motss' | ||
|
||
# - name: Publish to GPR (RC) | ||
# if: success() && contains(github.ref, '-rc') == true | ||
# run: | | ||
# npm config list | ||
# npm publish . --tag=next | ||
# env: | ||
# NODE_AUTH_TOKEN: ${{github.token}} | ||
|
||
# - name: Publish to GPR | ||
# if: success() && contains(github.ref, '-rc') == false | ||
# run: | | ||
# npm config list | ||
# npm publish . | ||
# env: | ||
# NODE_AUTH_TOKEN: ${{github.token}} |
2 changes: 1 addition & 1 deletion
2
.github/workflows/test-sauce-labs.yml → .github/workflows/sauce-labs.yml
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: test-sauce-labs | ||
name: Sauce Labs | ||
|
||
on: | ||
push: | ||
|