48 lines
1.0 KiB
YAML
48 lines
1.0 KiB
YAML
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
|