From eb0b527d2978a34feb520d75e16dc6982264b684 Mon Sep 17 00:00:00 2001 From: Spenser Black Date: Thu, 14 Nov 2024 13:13:51 -0500 Subject: [PATCH] Add publish workflow (#260) --- .github/workflows/publish.yml | 22 ++++++++++++++++++++++ HACKING.md | 3 ++- 2 files changed, 24 insertions(+), 1 deletion(-) 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..fb7bb54 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,22 @@ +name: Publish +on: + push: + tags: ["v*"] + +jobs: + publish: + name: Publish + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: "22.x" + cache: pnpm + - run: pnpm install + - run: pnpm publish --recursive --access public + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/HACKING.md b/HACKING.md index f05d275..d4e0199 100644 --- a/HACKING.md +++ b/HACKING.md @@ -31,5 +31,6 @@ pnpm run -w build ## Publishing ```shell -pnpm publish -r +# NOTE: This should happen automatically when creating a GitHub Release +pnpm publish --recursive --access public ```