From 5bb8bee7dbffe775fc1cb0095898dabc8e4b7844 Mon Sep 17 00:00:00 2001 From: Andrei Iarysh Date: Thu, 25 Aug 2022 10:54:44 +0200 Subject: [PATCH] Add actions for package publishing --- .github/workflows/{main.yml => build.yml} | 0 .github/workflows/publish.yml | 17 +++++++++++++++++ README.md | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) rename .github/workflows/{main.yml => build.yml} (100%) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/main.yml b/.github/workflows/build.yml similarity index 100% rename from .github/workflows/main.yml rename to .github/workflows/build.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..d26b5b7 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,17 @@ +name: publish +on: + release: + types: [created] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '16.7.x' + registry-url: 'https://registry.npmjs.org' + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/README.md b/README.md index 1c762df..b2d432c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # aglio-theme-hiro -![Build status](https://github.com/yarysh/aglio-theme-hiro/actions/workflows/main.yml/badge.svg) +![Build status](https://github.com/yarysh/aglio-theme-hiro/actions/workflows/build.yml/badge.svg) ![Snyk](https://snyk.io/test/github/yarysh/aglio-theme-hiro/badge.svg)