From d5b20cea4d22dcf7b01fa52a0927b9fcceae2fc7 Mon Sep 17 00:00:00 2001 From: Demetrius Kanios Date: Mon, 6 Jul 2026 11:07:44 -0700 Subject: [PATCH] Add release workflow --- .github/workflows/release.yml | 47 +++++++++++++++++++++++++++++++++++ 1 file changed, 47 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..81c22b1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,47 @@ +name: Release +on: + push: + tags: + - "v*" + workflow_dispatch: + +permissions: + contents: write + pull-requests: write + +jobs: + release: + name: Build and release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + submodules: true + + - name: Set up Node + uses: actions/setup-node@v6 + with: + node-version: 24 + package-manager-cache: false + + - name: Install dependencies + run: npm install -D + + - name: Build + run: npm pack + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + path: pumpkinmc-pumpkin-api-ts-*.tgz + + - name: Upload artifacts to release + if: startsWith(github.ref, 'refs/tags/v') + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.ref }} + file: pumpkinmc-pumpkin-api-ts-*.tgz + overwrite: true + file_glob: true