Merge pull request #290 from Haidra-Org/transformers-breaking-change #126
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: AI Horde worker new release | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
pull-requests: read | |
jobs: | |
build-n-publish: | |
name: AI Horde Worker new release | |
runs-on: ubuntu-latest | |
steps: | |
- name: "✔️ Checkout" | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: "📣 Release on push" | |
id: release | |
uses: rymndhng/release-on-push-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
bump_version_scheme: norelease | |
use_github_release_notes: true | |
- name: "✏️ Generate release changelog" | |
if: ${{ steps.release.outputs.version != '' }} | |
uses: heinrichreimer/github-changelog-generator-action@v2.3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: "💾 Commit new version" | |
if: ${{ steps.release.outputs.version != '' }} | |
run: | | |
version=${{ steps.release.outputs.version }} | |
major=$(echo ${version#v} | cut -d '.' -f 1) | |
minor=$(echo ${version} | cut -d '.' -f 2) | |
patch=$(echo ${version} | cut -d '.' -f 3) | |
sed -i "s/^BRIDGE_VERSION = .*/BRIDGE_VERSION = ${major}/g" ./worker/consts.py | |
sed -i "s/^RELEASE = f\"{BRIDGE_VERSION}.*\"/RELEASE = f\"{BRIDGE_VERSION}.${minor}.${patch}\"/g" ./worker/consts.py | |
git config user.email github-actions@github.com | |
git config user.name github-actions | |
git commit -am 'version incremented' | |
git push | |
- name: "Inform with Discord Webhook" | |
if: ${{ steps.release.outputs.version != '' }} | |
uses: tsickert/discord-webhook@v5.3.0 | |
with: | |
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }} | |
content: "New version of AI Horde Worker has been released: ${{ steps.release.outputs.version }}. Changelog: https://github.com/Haidra-Org/AI-Horde-Worker/releases/tag/${{ steps.release.outputs.version }}" |