Skip to content

Commit

Permalink
Move publish to its own action
Browse files Browse the repository at this point in the history
  • Loading branch information
johno committed Jul 17, 2020
1 parent afd60c2 commit 7829b88
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/publish.yml
@@ -0,0 +1,35 @@
name: CI

on: [push, pull_request]

jobs:
default:
name: Publish CI tagged release for MDX
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- uses: actions/setup-node@v1
with:
node-version: 14

- name: Setup yarn
run: |
curl -o- -L https://yarnpkg.com/install.sh | bash
export PATH="$HOME/.yarn/bin:$PATH"
- name: Install Dependencies
run: yarn --frozen-lockfile
env:
CI: 'true'

- name: Build
run: yarn build

- name: Publish CI tag to npm
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
npm set //registry.npmjs.org/:_authToken $NPM_AUTH_TOKEN
yarn publish-ci
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

0 comments on commit 7829b88

Please sign in to comment.