Create Release #57
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Release | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Install Dependencies | |
run: npm ci | |
- name: Build | |
run: | | |
npm run build | |
cp --force LICENSE.txt system/. | |
cp --force README.md system/. | |
SYSTEM_VERSION=$(grep -oP '(?<="version": ")[^"]+' system/system.json | tr -d '\n') | |
perl -pi -E "s|latest/download/shadowdark\\.zip|download/release-$SYSTEM_VERSION/shadowdark.zip|" system/system.json | |
echo "systemVersion=$SYSTEM_VERSION" >> $GITHUB_ENV | |
- run: cd system && zip -r ../shadowdark.zip ./* | |
- name: Create Version Release | |
id: create_version_release | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: false | |
name: release-${{ env.systemVersion }} | |
draft: false | |
prerelease: false | |
token: ${{ secrets.GITHUB_TOKEN }} | |
artifacts: './system/system.json, ./shadowdark.zip' | |
tag: release-${{ env.systemVersion }} |