From 44778026c9e957a7de10aee117bd4d570b62a941 Mon Sep 17 00:00:00 2001 From: Artyom Vancyan Date: Sun, 26 Feb 2023 21:18:06 +0400 Subject: [PATCH 1/2] GH-3: Setup GHA for publishing --- .github/workflows/publish.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 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..d2713d9 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,28 @@ +name: Publish to NPM + +on: + release: + types: [ published ] + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - name: Checkout + - uses: actions/checkout@v3 + + - name: Set up Node + uses: actions/setup-node@v3 + with: + node-version: 16.x + registry-url: https://registry.npmjs.org/ + + - name: Install dependencies + run: yarn && yarn install + + - name: Build and publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: yarn build && yarn publish From bff22414a3ca477730a15baf722bdb77c09e930b Mon Sep 17 00:00:00 2001 From: Artyom Vancyan Date: Sun, 26 Feb 2023 22:02:37 +0400 Subject: [PATCH 2/2] GH-3: Fix the YAML format --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d2713d9..7fb64c8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Checkout - - uses: actions/checkout@v3 + uses: actions/checkout@v3 - name: Set up Node uses: actions/setup-node@v3