Skip to content

Release Creation

Release Creation #8

Workflow file for this run

name: Release Creation
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Get Module ID
- name: Get Module ID
id: moduleID
uses: notiz-dev/github-action-json-property@release
with:
path: 'module.json'
prop_path: 'id'
# Substitute the Manifest and Download URLs in the manifest file
- name: Substitute Manifest and Download Links For Versioned Ones
id: sub_manifest_link_version
uses: microsoft/variable-substitution@v1
with:
files: "module.json"
env:
version: ${{github.event.release.tag_name}}
manifest: https://github.com/${{github.repository}}/releases/latest/download/module.json
download: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/${{steps.moduleID.outputs.prop}}.zip
# Create a zip file with all files required by the system to add to the release
- run: zip -r ./${{steps.moduleID.outputs.prop}}.zip apps/ assets/ css/ lang/ modules/ packs/ scripts/ tables/ templates/ CHANGELOG.md LICENSE README.md module.json ${{steps.moduleID.outputs.prop}}.mjs
# Create a release for this specific version
- name: Update Release with Files
id: create_version_release
uses: ncipollo/release-action@v1.10.0
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: "./module.json, ./${{steps.moduleID.outputs.prop}}.zip"
tag: ${{ github.event.release.tag_name }}
body: ${{ github.event.release.body }}
generateReleaseNotes: true
discussionCategory: "Announcements"