update repo description based on project readme #73
Workflow file for this run
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 Module Files For GitHub Release | |
env: | |
PROJECT_URL: "https://github.com/${{ github.repository }}" | |
LATEST_MANIFEST_URL: "https://github.com/${{ github.repository }}/releases/latest/download/module.json" | |
RELEASE_MODULE_URL: "https://github.com/${{ github.repository }}/releases/download/${{ github.event.release.tag_name || github.ref_name }}/module.zip" | |
on: | |
release: | |
types: [ published ] | |
push: | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]+' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Extract Version From Tag | |
id: get_version | |
uses: battila7/[email protected] | |
- name: Modify Module Manifest With Release-Specific Values | |
id: sub_manifest_link_version | |
uses: cschleiden/[email protected] | |
with: | |
files: 'module.json' | |
env: | |
VERSION: ${{steps.get_version.outputs.version-without-v}} | |
URL: ${{ env.PROJECT_URL }} | |
MANIFEST: ${{ env.LATEST_MANIFEST_URL }} | |
DOWNLOAD: ${{ env.RELEASE_MODULE_URL }} | |
- name: Downloading Dependencies | |
run: npm install --omit=dev | |
- name: Build | |
run: npm run build | |
- name: Create Module Archive | |
run: | | |
zip \ | |
--recurse-paths \ | |
./module.zip \ | |
module.json \ | |
README.md \ | |
LICENSE \ | |
templates \ | |
dist/ \ | |
styles/ \ | |
packs/ \ | |
languages/ | |
- name: Update Release With Files | |
id: create_version_release | |
uses: ncipollo/[email protected] | |
with: | |
allowUpdates: true | |
name: ${{ github.event.release.name }} | |
draft: ${{ github.event.release.unpublished }} | |
prerelease: ${{ github.event.release.prerelease }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
artifacts: './module.json, ./module.zip' | |
tag: ${{ github.event.release.tag_name }} | |
body: ${{ github.event.release.body }} | |
- name: Get Changes between Tags | |
id: changes | |
uses: simbo/changes-between-tags-action@v1 | |
with: | |
include-hashes: false | |
tag-pattern: ^[0-9]+\.[0-9]+\.[0-9]+$ | |
- name: Update Foundry VTT Module Repo | |
run: | | |
pip install markdown-it-py | |
python .github/workflows/foundry_release.py | |
env: | |
FOUNDRY_PACKAGE_RELEASE_TOKEN: ${{ secrets.FOUNDRY_PACKAGE_RELEASE_TOKEN }} | |
FOUNDRY_USERNAME: ${{ secrets.FOUNDRY_USERNAME }} | |
FOUNDRY_PASSWORD: ${{ secrets.FOUNDRY_PASSWORD }} | |
FOUNDRY_AUTHOR: ${{ secrets.FOUNDRY_AUTHOR }} | |
UPDATE_DISCORD_KEY: ${{ secrets.UPDATE_DISCORD_KEY }} | |
CHANGES: ${{ steps.changes.outputs.changes }} |