From b04e2ea5b35bedf30d5fefee8b0bf090250c2330 Mon Sep 17 00:00:00 2001 From: Keith Solomon Date: Sun, 4 Jan 2026 20:11:49 -0600 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8feature:=20Add=20action=20to=20build?= =?UTF-8?q?=20and=20tag=20release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 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 0000000..e4e27a8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,42 @@ +name: Build and Release + +on: + push: + branches: + - "**" + +permissions: + contents: write + +jobs: + build-release: + if: contains(github.event.head_commit.message, '#release') + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - name: Install dependencies + run: npm ci + + - name: Build distributables + run: npm run dist + + - name: Read package version + id: pkg + run: | + $version = node -p "require('./package.json').version" + "version=$version" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append + + - name: Create GitHub release + uses: softprops/action-gh-release@v2 + with: + tag_name: v${{ steps.pkg.outputs.version }} + generate_release_notes: true