Skip to content

Fix bash syntax

Fix bash syntax #3

Workflow file for this run

name: Release Creation
on:
push:
tags:
- "test-*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Load the system.json manifest into memory
- name: Load system manifest
id: manifest
uses: zoexx/github-action-json-file-properties@release
with:
file_path: "./public/system.json"
# Set up variables for future use
- name: Set up variables
id: get_vars
# Remove the 'v' from the tag for versioning
run: |
echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
echo "TAG_NAME=v$VERSION" >> $GITHUB_ENV
echo "ZIP_NAME=lancer-$TAG_NAME.zip" >> $GITHUB_ENV
# echo "RELEASE_DOWNLOAD_URL=https://github.com/${{github.repository}}/releases/download/$TAG_NAME/$ZIP_NAME" >> $GITHUB_ENV
# echo "RELEASE_MANIFEST_URL=https://github.com/${{github.repository}}/releases/download/$TAG_NAME/system.json" >> $GITHUB_ENV
# Verify correct naming
- name: Verify correct naming
env:
TAG_NAME: ${{ env.TAG_NAME }}
PACKAGE_VERSION: ${{ steps.manifest.outputs.version }}
run: |
if [[ ! $TAG_NAME == test-$PACKAGE_VERSION ]]; then
echo "The system.json version does not match tag name."
echo "system.json: $PACKAGE_VERSION"
echo "tag name: $TAG_NAME"
echo "Please fix this and push the tag again."
exit 1
fi
# Set up Node
- uses: actions/setup-node@v4
with:
node-version: "18"
cache: "npm"
# Install Dependencies
- name: Install Dependencies
run: npm ci
# Build the code and packs for distribution
- name: Build For Distribution
run: |
gulp build
gulp build_packs
# Package the built files
- name: Package Files
run: gulp package
# Create a release for this specific version
- name: Create Release with Files
id: create_version_release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
name: ${{ env.TAG_NAME }}
draft: true
prerelease: true
omitDraftDuringUpdate: true
omitPrereleaseDuringUpdate: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "./system.json, ./${{ env.ZIP_NAME }}"
tag: ${{ env.TAG_NAME }}
# TODO: can we automatically extract the changelog for this release?
body: |
**Installation:** To manually install this release, please use the following manifest URL: ${{ env.RELEASE_MANIFEST_URL }}