Skip to content

Commit

Permalink
.........
Browse files Browse the repository at this point in the history
  • Loading branch information
myin142 committed Oct 9, 2024
1 parent dfee3a7 commit 4518e48
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ on:
add-changelog:
description: 'Add changelog to release'
type: boolean
default: false
default: true
notify:
description: 'Notify on discord'
type: boolean
default: true
secrets:
discord-webhook:
required: true
Expand Down Expand Up @@ -51,13 +55,13 @@ jobs:

- id: build-name
run: |
TAG=$GAME_NAME
TAG="$GAME_NAME-${{ github.ref_name }}"
if [ ! -z "$BRANCH" ]; then
TAG="$TAG-$BRANCH"
fi
echo "tag=$TAG" >> $GITHUB_OUTPUT
echo "name=Release $GAME_NAME $BRANCH" >> $GITHUB_OUTPUT
echo "name=Release $GAME_NAME ${{github.ref_name}} $BRANCH" >> $GITHUB_OUTPUT
env:
GAME_NAME: ${{ inputs.name }}
BRANCH: ${{ inputs.branch }}
Expand All @@ -78,14 +82,14 @@ jobs:
uses: ./discord
with:
discord-webhook: ${{ secrets.discord-webhook }}
title: "${{ inputs.name }} - New Release ${{ github.ref }}"
title: "${{ inputs.name }} - New Release ${{ github.ref_name }} ${{ inputs.branch }}"
message: "${{ steps.changelog.outputs.changelog }} \n\nPassword: ${{ secrets.password }}\n${{ steps.release.outputs.url }}"

- name: Failed release!
if: failure()
uses: ./discord
with:
discord-webhook: ${{ secrets.discord-webhook }}
title: "${{ inputs.name }} - Failed Release ${{ github.ref }}"
title: "${{ inputs.name }} - Failed Release ${{ github.ref_name }} ${{ inputs.branch }}"
message: "See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
failure: true
5 changes: 5 additions & 0 deletions .github/workflows/steam-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
description: 'Steam branch to release'
type: string
default: ''
notify:
description: 'Notify on discord'
type: boolean
default: true

concurrency:
group: ${{ github.workflow }}
Expand Down Expand Up @@ -91,6 +95,7 @@ jobs:
artifact: release-*
name: ${{ vars.GAME_NAME }}
branch: ${{ inputs.branch }}
notify: ${{ inputs.notify }}
secrets:
discord-webhook: ${{ secrets.DISCORD_RELEASE_HOOK }}
password: ${{ needs.generate-password.outputs.password }}

0 comments on commit 4518e48

Please sign in to comment.