Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update release notifier #81

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 30 additions & 15 deletions .github/workflows/release-notifier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ on:

jobs:
discord:
if: startsWith(github.repository, 'LizardByte/')
if: >-
(github.repository, 'LizardByte/') and
not(github.event.release.prerelease) and
not(github.event.release.draft)
runs-on: ubuntu-latest
steps:
- name: discord
uses: sarisia/actions-status-discord@v1 # https://github.com/sarisia/actions-status-discord
uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ secrets.DISCORD_RELEASE_WEBHOOK }}
nodetail: true
Expand All @@ -30,11 +33,14 @@ jobs:
color: 0xFF4500

facebook_group:
if: startsWith(github.repository, 'LizardByte/')
if: >-
(github.repository, 'LizardByte/') and
not(github.event.release.prerelease) and
not(github.event.release.draft)
runs-on: ubuntu-latest
steps:
- name: facebook-post-action
uses: ReenigneArcher/facebook-post-action@v1 # https://github.com/ReenigneArcher/facebook-post-action
uses: ReenigneArcher/facebook-post-action@v1
with:
page_id: ${{ secrets.FACEBOOK_GROUP_ID }}
access_token: ${{ secrets.FACEBOOK_ACCESS_TOKEN }}
Expand All @@ -44,11 +50,14 @@ jobs:
url: ${{ github.event.release.html_url }}

facebook_page:
if: startsWith(github.repository, 'LizardByte/')
if: >-
(github.repository, 'LizardByte/') and
not(github.event.release.prerelease) and
not(github.event.release.draft)
runs-on: ubuntu-latest
steps:
- name: facebook-post-action
uses: ReenigneArcher/facebook-post-action@v1 # https://github.com/ReenigneArcher/facebook-post-action
uses: ReenigneArcher/facebook-post-action@v1
with:
page_id: ${{ secrets.FACEBOOK_PAGE_ID }}
access_token: ${{ secrets.FACEBOOK_ACCESS_TOKEN }}
Expand All @@ -58,11 +67,14 @@ jobs:
url: ${{ github.event.release.html_url }}

reddit:
if: startsWith(github.repository, 'LizardByte/')
if: >-
(github.repository, 'LizardByte/') and
not(github.event.release.prerelease) and
not(github.event.release.draft)
runs-on: ubuntu-latest
steps:
- name: reddit
uses: bluwy/release-for-reddit-action@v2 # https://github.com/bluwy/release-for-reddit-action
uses: bluwy/release-for-reddit-action@v2
with:
username: ${{ secrets.REDDIT_USERNAME }}
password: ${{ secrets.REDDIT_PASSWORD }}
Expand All @@ -75,14 +87,17 @@ jobs:
comment: ${{ github.event.release.body }}

twitter:
if: startsWith(github.repository, 'LizardByte/')
if: >-
(github.repository, 'LizardByte/') and
not(github.event.release.prerelease) and
not(github.event.release.draft)
runs-on: ubuntu-latest
steps:
- name: twitter
uses: ethomson/send-tweet-action@v1 # https://github.com/ethomson/send-tweet-action
uses: nearform-actions/github-action-notify-twitter@v1
with:
consumer-key: ${{ secrets.TWITTER_API_KEY }}
consumer-secret: ${{ secrets.TWITTER_API_SECRET }}
access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
status: ${{ github.event.release.html_url }}
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 }}