Add release workflow

This commit is contained in:
Demetrius Kanios 2026-07-06 11:07:44 -07:00
parent 6d836f6d6d
commit d5b20cea4d

47
.github/workflows/release.yml vendored Normal file
View File

@ -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