Publish to Foundry #83
This file contains hidden or 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
| # SPDX-FileCopyrightText: 2021 Johannes Loher | |
| # | |
| # SPDX-License-Identifier: MIT | |
| name: Publish to Foundry | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "Module version to publish (e.g. 1.3.0)" | |
| required: true | |
| env: | |
| node_version: 20 | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Autopublish to Foundry Admin | |
| uses: Varriount/fvtt-autopublish@v2.0.2 | |
| with: | |
| username: ${{ secrets.FVTT_USERNAME }} | |
| password: ${{ secrets.FVTT_PASSWORD }} | |
| module-id: ${{ secrets.FVTT_PACKAGE_ID }} | |
| manifest-url: https://github.com/${{ github.repository }}/releases/download/v${{ github.event.inputs.version }}/module.json | |
| manifest-file: ./module.json | |
| - name: Post to GFX Discord | |
| env: | |
| DISCORD_WEBHOOK: ${{ secrets.DISCORD_GFX_WEBHOOK }} | |
| run: | | |
| VERSION="${{ github.event.inputs.version }}" | |
| RELEASE_NOTES=$(sed ':a;N;$!ba;s/\n/\\n/g' release_notes.txt) | |
| curl -H "Content-Type: application/json" \ | |
| -d '{ | |
| "embeds": [{ | |
| "title": "Gambit'\''s FXMaster Release: '"$VERSION"'", | |
| "description": "**To support my continued work on this module!**\n[Patreon ❤️](https://www.patreon.com/GambitsLounge) | [Ko-fi ❤️](https://ko-fi.com/gambit07)\n\n'"$RELEASE_NOTES"'\n\nCheck it out through the Foundry package manager or the link below:\n<https://github.com/'"${{ github.repository }}"'/releases/tag/v'"$VERSION"'>", | |
| "image": { | |
| "url": "https://avatars.githubusercontent.com/u/4236874?s=400&u=05d3718580ef87ea13467131a0c1fcaf4956630d&v=4" | |
| } | |
| }] | |
| }' $DISCORD_WEBHOOK | |
| - name: Post to Midi Discord | |
| env: | |
| DISCORD_WEBHOOK: ${{ secrets.DISCORD_MIDI_WEBHOOK }} | |
| run: | | |
| VERSION="${{ github.event.inputs.version }}" | |
| RELEASE_NOTES=$(sed ':a;N;$!ba;s/\n/\\n/g' release_notes.txt) | |
| curl -H "Content-Type: application/json" \ | |
| -d '{ | |
| "embeds": [{ | |
| "title": "Gambit'\''s FXMaster Release: '"$VERSION"'", | |
| "description": "**To support my continued work on this module!**\n[Patreon ❤️](https://www.patreon.com/GambitsLounge) | [Ko-fi ❤️](https://ko-fi.com/gambit07)\n\n'"$RELEASE_NOTES"'\n\nCheck it out through the Foundry package manager or the link below:\n<https://github.com/'"${{ github.repository }}"'/releases/tag/v'"$VERSION"'>", | |
| "image": { | |
| "url": "https://avatars.githubusercontent.com/u/4236874?s=400&u=05d3718580ef87ea13467131a0c1fcaf4956630d&v=4" | |
| } | |
| }] | |
| }' $DISCORD_WEBHOOK |