2022-07-10 12:23:10 +00:00
|
|
|
# Runs on releases
|
|
|
|
|
|
|
|
name: Publish release notes
|
|
|
|
on:
|
|
|
|
release:
|
2022-08-14 22:20:03 +00:00
|
|
|
types: [ published ]
|
2022-07-10 12:23:10 +00:00
|
|
|
|
|
|
|
jobs:
|
2022-08-30 04:27:55 +00:00
|
|
|
|
|
|
|
stable:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout Code
|
|
|
|
uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # pin@v2
|
|
|
|
- name: Version Check
|
|
|
|
run: |
|
|
|
|
pip install requests
|
|
|
|
python3 ci/version_check.py
|
|
|
|
- name: Push to Stable Branch
|
|
|
|
uses: ad-m/github-push-action@9a46ba8d86d3171233e861a4351b1278a2805c83 # pin@master
|
|
|
|
if: env.stable_release == 'true'
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
branch: stable
|
|
|
|
force: true
|
|
|
|
|
2022-07-10 12:23:10 +00:00
|
|
|
tweet:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-08-14 22:20:03 +00:00
|
|
|
- uses: Eomm/why-don-t-you-tweet@f61f2a86c30c46528c1398a1abb1f64aa0988f69 # pin@v1
|
2022-07-10 12:23:10 +00:00
|
|
|
with:
|
2022-08-14 22:20:03 +00:00
|
|
|
tweet-message: "InvenTree release ${{ github.event.release.tag_name }} is out
|
|
|
|
now! Release notes: ${{ github.event.release.html_url }} #opensource
|
|
|
|
#inventree"
|
2022-07-22 03:44:40 +00:00
|
|
|
env:
|
|
|
|
TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
|
|
|
|
TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
|
|
|
|
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
|
|
|
|
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
|
2022-07-10 12:23:10 +00:00
|
|
|
|
|
|
|
reddit:
|
2022-08-14 22:20:03 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: bluwy/release-for-reddit-action@4d948192aff856da22f19f9806b00b46ca384547 # pin@v1
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.REDDIT_USERNAME }}
|
|
|
|
password: ${{ secrets.REDDIT_PASSWORD }}
|
|
|
|
app-id: ${{ secrets.REDDIT_APP_ID }}
|
|
|
|
app-secret: ${{ secrets.REDDIT_APP_SECRET }}
|
|
|
|
subreddit: InvenTree
|
|
|
|
title: "InvenTree version ${{ github.event.release.tag_name }} released"
|
|
|
|
comment: "${{ github.event.release.body }}"
|