Skip to content

Commit

Permalink
automate npm publish
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomoreno committed Jul 14, 2021
1 parent 0b956ff commit f3b69c0
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 26 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI
on: push

jobs:
build:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
- run: yarn
- run: yarn
working-directory: ./sample
- name: Run tests
uses: GabrielBB/xvfb-action@v1.0
with:
run: yarn --cwd ./sample test

publish:
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
registry-url: "https://registry.npmjs.org"
- run: yarn
- run: yarn
working-directory: ./sample
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
26 changes: 0 additions & 26 deletions .github/workflows/sample.yml

This file was deleted.

0 comments on commit f3b69c0

Please sign in to comment.