From ed5562eeecd104a41874c491cdd67471b4705498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20L=2E=20K=2E=20S=C3=B8rensen?= Date: Fri, 17 May 2024 20:16:14 +0200 Subject: [PATCH] ci: automate release on tags (#34) --- .github/workflows/release.yml | 23 +++++++++++++++++++++++ .gitignore | 1 + 2 files changed, 24 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..ce84c8ff --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,23 @@ +name: Build and Release NPM Package + +on: + push: + branches: [main] + create: + tags: + - v* + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version: '20' + - run: npm ci + - run: npm run build + - run: npm run test + - uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} diff --git a/.gitignore b/.gitignore index 7960f433..da022208 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ scratch.js .vscode/ .idea/ coverage/ +.secrets