Skip to content

Release

Release #21

Workflow file for this run

name: Release
permissions:
contents: write
actions: write
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
release:
runs-on: windows-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Sync package version from tag
if: startsWith(github.ref, 'refs/tags/v')
run: |
$version = "${{ github.ref_name }}".TrimStart('v')
npm version $version --no-git-tag-version --allow-same-version
- name: Build and Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run release
- name: Upload Release Assets
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
release/*.exe
release/*.yml
release/*.blockmap
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}