Skip to content

Create Release

Create Release #1

Workflow file for this run

name: Create Release
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Create Release Notes Document
run: npm run notes
- name: Build
run: |
npm run build
SYSTEM_VERSION=$(grep -oP '(?<="version": ")[^"]+' module.json | tr -d '\n')
perl -pi -E "s|latest/download/simple-dice-stats\\.zip|download/release-$SYSTEM_VERSION/simple-dice-stats.zip|" module.json
echo "systemVersion=$SYSTEM_VERSION" >> $GITHUB_ENV
- run: zip -r ../simple-dice-stats.zip ./*
- name: Create Version Release
id: create_version_release
uses: ncipollo/release-action@v1
with:
allowUpdates: false
artifacts: './module.json, ./simple-dice-stats.zip'
draft: false
name: release-${{ env.systemVersion }}
prerelease: true
tag: release-${{ env.systemVersion }}
token: ${{ secrets.GITHUB_TOKEN }}