From b3331f883d5eb744f108cfae2ccbe0bc5fe01350 Mon Sep 17 00:00:00 2001 From: andyv09 Date: Fri, 5 Aug 2022 13:25:30 +0200 Subject: [PATCH] ci: add publish workflow --- .github/workflows/publish.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 000000000..4560bffa4 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,30 @@ +name: Pull request + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16.15.1 + - run: yarn install + - run: yarn build + publish: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 16.15.1 + registry-url: https://registry.npmjs.org/ + - run: yarn install + - run: yarn build + - run: yarn publish + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}