Skip to content

Commit

Permalink
ci: Minor renaming and add publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
motss committed Mar 26, 2020
1 parent e9bfc01 commit 26524cd
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 104 deletions.
101 changes: 0 additions & 101 deletions .circleci/config.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/test-local.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test-local
name: ci

on:
push:
Expand All @@ -19,7 +19,7 @@ jobs:
timeout-minutes: 120
strategy:
matrix:
os: [macos-latest, ubuntu-18.04, windows-2019]
os: [macos-latest, ubuntu-18.04]
target: [13.x]

steps:
Expand Down
76 changes: 76 additions & 0 deletions .github/workflows/publish.yml
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}}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test-sauce-labs
name: Sauce Labs

on:
push:
Expand Down

0 comments on commit 26524cd

Please sign in to comment.