From fafc774c743335d1d19b4a6629aacd2b63754a93 Mon Sep 17 00:00:00 2001 From: ziga Date: Sun, 27 Sep 2020 20:48:19 +0200 Subject: [PATCH] Automate publish --- .github/workflows/publish.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..f43f89f --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,21 @@ +name: Publish package to npm + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + # Setup .npmrc file to publish to npm + - uses: actions/setup-node@v1 + with: + node-version: "14.x" + registry-url: "https://registry.npmjs.org" + - run: yarn + - run: yarn build + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}