Skip to content

1.5.0

1.5.0 #43

Workflow file for this run

name: Release Creation
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Substitute the Manifest and Download URLs in the module.json
- name: Substitute Manifest and Download Links For Versioned Ones
id: sub_manifest_link_version
uses: cschleiden/replace-tokens@v1
with:
files: 'module/module.json'
env:
VERSION: ${{ github.event.release.tag_name }}
URL: https://github.com/${{ github.repository }}
MANIFEST: https://github.com/${{ github.repository }}/releases/latest/download/module.json
DOWNLOAD: https://github.com/${{ github.repository }}/releases/download/${{ github.event.release.tag_name }}/module.zip
CHANGELOG: https://github.com/${{ github.repository }}/releases/tag/${{ github.event.release.tag_name }}
# Create a zip file with all files required by the module to add to the release
- name: Zip Files
id: zip_files
run: zip -r ./module.zip module/ LICENSE
# 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
omitNameDuringUpdate: true
omitBodyDuringUpdate: true
omitDraftDuringUpdate: true
omitPrereleaseDuringUpdate: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: './module/module.json, ./module.zip'
tag: ${{ github.event.release.tag_name }}
# Publish the release to FoundryVTT's package repository.
- name: Publish Module to FoundryVTT Website
id: publish_to_foundry_website
if: ${{ !github.event.release.unpublished && !github.event.release.prerelease }}
uses: Varriount/[email protected]
with:
username: ${{ secrets.FOUNDRY_ADMIN_USERNAME }}
password: ${{ secrets.FOUNDRY_ADMIN_PASSWORD }}
module-id: ${{ secrets.FOUNDRY_ADMIN_MODULE_ID }}
manifest-url: https://github.com/${{ github.repository }}/releases/download/${{ github.event.release.tag_name }}/module.json
manifest-file: ./module/module.json