Skip to content

Commit

Permalink
ci(github actions): add action for publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandryackovlev committed Jan 6, 2021
1 parent 558e9fb commit b9978bb
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: publish

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- name: Setup etcd
run: |
docker-compose -f tools/docker/docker-compose.yml --project-directory ./ up -d
./third_party/wait-for-it.sh 0.0.0.0:2379
./third_party/wait-for-it.sh 0.0.0.0:2381
- name: Run e2e tests
run: |
yarn install --frozen-lockfile
yarn test
- name: Build
run: yarn build

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

publish-gpr:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit b9978bb

Please sign in to comment.