Skip to content

Commit

Permalink
chore: update global workflows (#563)
Browse files Browse the repository at this point in the history
  • Loading branch information
LizardByte-bot committed Jul 28, 2024
1 parent 078ce19 commit 2553730
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 79 deletions.
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
# This file is centrally managed in https://github.com/<organization>/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
# the above-mentioned repo.

blank_issues_enabled: false
contact_links:
- name: Support Center
url: https://app.lizardbyte.dev/support
about: Official LizardByte support
- name: Feature request
url: https://app.lizardbyte.dev/feedback
about: Share your suggestions or ideas to help us improve
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# This action is centrally managed in https://github.com/<organization>/.github/
# This file is centrally managed in https://github.com/<organization>/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
# the above-mentioned repo.

Expand Down
2 changes: 1 addition & 1 deletion .github/label-actions.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# This action is centrally managed in https://github.com/<organization>/.github/
# This file is centrally managed in https://github.com/<organization>/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
# the above-mentioned repo.

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:

- name: Setup Release
id: setup_release
uses: LizardByte/setup-release-action@v2024.714.140421
uses: LizardByte/setup-release-action@v2024.725.234618
with:
dotnet: ${{ needs.check_dockerfiles.outputs.dotnet }}
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
61 changes: 0 additions & 61 deletions .github/workflows/issues-stale.yml

This file was deleted.

54 changes: 39 additions & 15 deletions .github/workflows/release-notifier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,52 @@ name: Release Notifications
on:
release:
types:
- released # this triggers when a release is published, but does not include prereleases or drafts
- released # this triggers when a release is published, but does not include pre-releases or drafts

jobs:
simplified_changelog:
if: >-
startsWith(github.repository, 'LizardByte/') &&
!github.event.release.prerelease &&
!github.event.release.draft
outputs:
SIMPLIFIED_BODY: ${{ steps.output.outputs.SIMPLIFIED_BODY }}
runs-on: ubuntu-latest
steps:
- name: remove contributors section
env:
RELEASE_BODY: ${{ github.event.release.body }}
id: output
run: |
echo "${RELEASE_BODY}" > ./release_body.md
modified_body=$(sed '/^---$/d; /^## Contributors$/,/<\/a>/d' ./release_body.md)
echo "modified_body: ${modified_body}"
# use a heredoc to ensure the output is multiline
echo "SIMPLIFIED_BODY<<EOF" >> $GITHUB_OUTPUT
echo "${modified_body}" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
discord:
if: >-
startsWith(github.repository, 'LizardByte/') &&
!github.event.release.prerelease &&
!github.event.release.draft
needs: simplified_changelog
runs-on: ubuntu-latest
steps:
- name: discord
uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ secrets.DISCORD_RELEASE_WEBHOOK }}
avatar_url: ${{ secrets.ORG_LOGO_URL }}
color: 0x00ff00
description: ${{ needs.simplified_changelog.outputs.SIMPLIFIED_BODY }}
nodetail: true
nofail: false
username: ${{ secrets.DISCORD_USERNAME }}
avatar_url: ${{ secrets.ORG_LOGO_URL }}
title: ${{ github.event.repository.name }} ${{ github.ref_name }} Released
description: ${{ github.event.release.body }}
color: 0xFF4500
url: ${{ github.event.release.html_url }}
username: ${{ secrets.DISCORD_USERNAME }}
webhook: ${{ secrets.DISCORD_RELEASE_WEBHOOK }}

facebook_group:
if: >-
Expand All @@ -46,7 +71,6 @@ jobs:
access_token: ${{ secrets.FACEBOOK_ACCESS_TOKEN }}
message: |
${{ github.event.repository.name }} ${{ github.ref_name }} Released
${{ github.event.release.body }}
url: ${{ github.event.release.html_url }}

facebook_page:
Expand All @@ -63,14 +87,14 @@ jobs:
access_token: ${{ secrets.FACEBOOK_ACCESS_TOKEN }}
message: |
${{ github.event.repository.name }} ${{ github.ref_name }} Released
${{ github.event.release.body }}
url: ${{ github.event.release.html_url }}

reddit:
if: >-
startsWith(github.repository, 'LizardByte/') &&
!github.event.release.prerelease &&
!github.event.release.draft
needs: simplified_changelog
runs-on: ubuntu-latest
steps:
- name: reddit
Expand All @@ -84,20 +108,20 @@ jobs:
title: ${{ github.event.repository.name }} ${{ github.ref_name }} Released
url: ${{ github.event.release.html_url }}
flair-id: ${{ secrets.REDDIT_FLAIR_ID }} # https://www.reddit.com/r/<subreddit>>/api/link_flair.json
comment: ${{ github.event.release.body }}
comment: ${{ needs.simplified_changelog.outputs.SIMPLIFIED_BODY }}

twitter:
x:
if: >-
startsWith(github.repository, 'LizardByte/') &&
!github.event.release.prerelease &&
!github.event.release.draft
runs-on: ubuntu-latest
steps:
- name: twitter
- name: x
uses: nearform-actions/github-action-notify-twitter@v1
with:
message: ${{ github.event.release.html_url }}
twitter-app-key: ${{ secrets.TWITTER_API_KEY }}
twitter-app-secret: ${{ secrets.TWITTER_API_SECRET }}
twitter-access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
twitter-access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
twitter-app-key: ${{ secrets.X_APP_KEY }}
twitter-app-secret: ${{ secrets.X_APP_SECRET }}
twitter-access-token: ${{ secrets.X_ACCESS_TOKEN }}
twitter-access-token-secret: ${{ secrets.X_ACCESS_TOKEN_SECRET }}

0 comments on commit 2553730

Please sign in to comment.