From 4f8e06a6ca786b24518ef4c07748af4b4363c3fe Mon Sep 17 00:00:00 2001 From: Josiah Campbell <9521010+jocmp@users.noreply.github.com> Date: Sun, 15 Dec 2024 21:22:45 -0600 Subject: [PATCH] Add publish workflow --- .github/publish.yml | 21 +++++++++++++++++++++ .tool-versions | 2 +- Makefile | 5 +++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .github/publish.yml create mode 100644 Makefile diff --git a/.github/publish.yml b/.github/publish.yml new file mode 100644 index 0000000..2bf20b1 --- /dev/null +++ b/.github/publish.yml @@ -0,0 +1,21 @@ +name: Publish Package to npmjs + +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + registry-url: "https://registry.npmjs.org" + - run: npm ci + - run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.tool-versions b/.tool-versions index f8ab203..42738c5 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -nodejs 22.11.0 +nodejs 22.12.0 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..96e4047 --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +SHELL :=/usr/bin/env bash + +.PHONY: deps +deps: ## Install bumpver + pip install bumpver==2024.1130