From 2d9c8892fbc2b26e8089f8fa3ff3ddac493175c1 Mon Sep 17 00:00:00 2001 From: Gambit Date: Wed, 24 Jul 2024 20:10:01 -0400 Subject: [PATCH] 0.5.9 --- .github/workflows/main.yml | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4289bd60..95286e50 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,11 @@ name: Module Builder +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}}/module.zip" + changelog_url: "https://github.com/${{github.repository}}/releases/tag/${{github.event.release.tag_name}}" + on: push: branches: @@ -34,10 +40,9 @@ jobs: working-directory: ./ run: zip -r ./module.zip ./* - - name: Get Version - shell: bash - id: get-version - run: echo "version=$(node ./.github/workflows/get-version.js)" >> $GITHUB_OUTPUT + - name: Extract Version From Tag + id: get_version + uses: battila7/get-version-action@v2 - name: Modify Module Manifest With Release-Specific Values id: sub_manifest_link_version @@ -45,7 +50,7 @@ jobs: with: files: 'module.json' env: - VERSION: ${{ steps.get-version.outputs.version }} + VERSION: ${{steps.get_version.outputs.version-without-v}} URL: ${{ env.project_url }} MANIFEST: ${{ env.latest_manifest_url }} DOWNLOAD: ${{ env.release_module_url }} @@ -56,13 +61,13 @@ jobs: uses: ncipollo/release-action@v1 with: allowUpdates: true - name: Release ${{ steps.get-version.outputs.version }} + name: Release ${{steps.get_version.outputs.version-without-v}} draft: false prerelease: false body: ${{ env.release-notes-github }} token: ${{ secrets.GITHUB_TOKEN }} artifacts: './module.zip, ./module.json' - tag: ${{ steps.get-version.outputs.version }} + tag: ${{steps.get_version.outputs.version-without-v}} - name: Release Foundry Package run: | @@ -72,9 +77,9 @@ jobs: -d '{ "id": "'"gambits-premades"'", "release": { - "version": "'"${{ steps.get-version.outputs.version }}"'", + "version": "'"${{steps.get_version.outputs.version-without-v}}"'", "manifest": "'"https://github.com/gambit07/gambits-premades/releases/latest/download/module.json"'", - "notes": "'"https://github.com/gambit07/gambits-premades/releases/tag/${{ steps.get-version.outputs.version }}"'", + "notes": "'"https://github.com/gambit07/gambits-premades/releases/tag/${{steps.get_version.outputs.version-without-v}}"'", "compatibility": { "minimum": "'"12.328"'", "verified": "'"12"'", @@ -90,8 +95,8 @@ jobs: curl -H "Content-Type: application/json" \ -d '{ "embeds": [{ - "title": "Gambit'"'"'s Premades Release: ${{ steps.get-version.outputs.version }}", - "description": "**To support my continued work on this module!\n ❤️**\n\n${{ steps.format-release-notes-discord.outputs.release-notes-discord }}\n\nCheck it out through the Foundry package manager or the link below:\n", + "title": "Gambit'"'"'s Premades Release: ${{steps.get_version.outputs.version-without-v}}", + "description": "**To support my continued work on this module!\n ❤️**\n\n${{ steps.format-release-notes-discord.outputs.release-notes-discord }}\n\nCheck it out through the Foundry package manager or the link below:\n", "image": { "url": "https://avatars.githubusercontent.com/u/4236874?s=400&u=05d3718580ef87ea13467131a0c1fcaf4956630d&v=4" }