From 752ca147ffca59f63b94b356e2c61322c36d5f2d Mon Sep 17 00:00:00 2001 From: Gregor Lohaus Date: Sun, 24 May 2026 15:30:10 +0200 Subject: [PATCH] publish workflow, version bump --- .gitea/workflows/publish.yml | 39 ++++++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .gitea/workflows/publish.yml diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml new file mode 100644 index 0000000..f09cd60 --- /dev/null +++ b/.gitea/workflows/publish.yml @@ -0,0 +1,39 @@ +name: Publish npm package + +on: + push: + tags: + - "v*" + +jobs: + publish: + runs-on: x86 + + steps: + - uses: actions/checkout@v4 + + - uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - uses: actions/setup-node@v4 + with: + node-version: 24 + registry-url: "https://registry.npmjs.org" + + - name: Install dependencies + run: bun install --frozen-lockfile + + - name: Check tag matches package version + run: | + PACKAGE_VERSION="v$(node -p "require('./package.json').version")" + TAG_NAME="${GITHUB_REF_NAME:-${GITHUB_REF#refs/tags/}}" + test "$PACKAGE_VERSION" = "$TAG_NAME" + + - name: Build + run: bun run build + + - name: Publish + run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index 02602e4..61df3fb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "create-glstack", - "version": "0.0.4", + "version": "0.0.5", "type": "module", "license": "MIT", "bin": {