Skip to content

Release 0.18.1-rc.1 #34

Release 0.18.1-rc.1

Release 0.18.1-rc.1 #34

Workflow file for this run

name: Pre-Release Creation
on:
release:
types: [prereleased]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Extract tag version number
id: get_version
uses: battila7/get-version-action@v2
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm ci;
- name: Build the project
run: npm run build;
- name: Substitute manifest and download links for versioned ones
run: |
jq --arg version "$RELEASE_VERSION" \
--arg url "https://github.com/$GITHUB_REPOSITORY" \
--arg manifest "https://raw.githubusercontent.com/$GITHUB_REPOSITORY/prerelease/system.json" \
--arg download "https://github.com/$GITHUB_REPOSITORY/releases/download/$RELEASE_TAG/system.zip" \
'.version = $version | .manifest = $manifest | .download = $download | .url = $url' \
dist/system.json > tmp.$$.json && cp tmp.$$.json system.json && mv tmp.$$.json dist/system.json
env:
RELEASE_VERSION: ${{steps.get_version.outputs.version-without-v}}
RELEASE_TAG: ${{github.event.release.tag_name}}
GITHUB_REPOSITORY: ${{github.repository}}
GITHUB_BRANCH: ${{github.branch}}
# Create a zip file with all files required by the module to add to the release
- name: Zip fist
run: |
cd dist
zip -r "./system.zip" ./*
env:
RELEASE_VERSION: ${{steps.get_version.outputs.version-without-v}}
# Create a release for this specific version
- name: Update Release with Files
id: create_version_release
uses: ncipollo/release-action@v1
with:
allowUpdates: true # Set this to false if you want to prevent updating existing releases
name: ${{ github.event.release.name }}
draft: ${{ github.event.release.unpublished }}
prerelease: ${{ github.event.release.prerelease }}
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: './dist/system.json, ./dist/system.zip'
tag: ${{ github.event.release.tag_name }}
body: ${{ github.event.release.body }}