Skip to content

Commit

Permalink
Best workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Haxxer committed Jun 29, 2024
1 parent 0960d1c commit 1fb5f35
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
types: [ published ]

env:
package_name: Item Piles
package_id: item-piles

jobs:
Expand Down Expand Up @@ -74,7 +75,7 @@ jobs:
echo 'EOF' >> $GITHUB_ENV
- name: Send package to foundry
if: false #"!github.event.release.prerelease"
if: "!github.event.release.prerelease"
run: |
HTTP_RESPONSE=$(curl --silent --write-out "HTTPSTATUS:%{http_code}" -X POST 'https://api.foundryvtt.com/_api/packages/release_version/' \
--header 'Authorization: ${{ secrets.PACKAGE_TOKEN }}' \
Expand Down Expand Up @@ -104,14 +105,23 @@ jobs:
exit 1
fi
- name: Discord notification
- name: FC Discord notification
if: "!github.event.release.prerelease"
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
DISCORD_USERNAME: Item Piles Releases
DISCORD_USERNAME: ${{env.package_name}} Version ${{github.event.release.tag_name}}
uses: Ilshidur/action-discord@master
with:
args: "${{github.event.release.body}}"

- name: JB2A Discord notification
if: "!github.event.release.prerelease"
env:
DISCORD_WEBHOOK: ${{ secrets.JB2A_WEBHOOK_URL }}
DISCORD_USERNAME: ${{env.package_name}} Version ${{github.event.release.tag_name}}
uses: Ilshidur/action-discord@master
with:
args: "**Item Piles Version ${{github.event.release.tag_name}}**\n${{github.event.release.body}}"
args: "${{github.event.release.body}}"

# OR create a pre-release for this specific version
- name: Update Release with Files
Expand Down

0 comments on commit 1fb5f35

Please sign in to comment.