3.0.0-alpha.9 #16
Workflow file for this run
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: "Release" | |
on: | |
release: | |
types: [ published ] | |
env: | |
TARGET_BRANCH: develop | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ env.TARGET_BRANCH }} | |
- name: Update version in package.json | |
run: | | |
cd frontend | |
npm version ${{ github.event.release.tag_name }} | |
cd .. | |
- name: Update version in backend/config.py | |
run: | | |
cd backend | |
echo ${{ github.event.release.tag_name }} > .version | |
cd .. | |
- name: Update changelog | |
uses: stefanzweifel/changelog-updater-action@v1 | |
with: | |
latest-version: ${{ github.event.release.name }} | |
release-notes: ${{ github.event.release.body }} | |
- name: Commit updated changelog | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
branch: ${{ env.TARGET_BRANCH }} | |
commit_message: Release version ${{ github.event.release.tag_name }} | |
- name: Force move the tag to the current commit | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git tag -fa ${{ github.event.release.tag_name }} -m "Release version ${{ github.event.release.tag_name }}" | |
git push -f --tags | |
- name: "Send webhook to Discord" | |
uses: sarisia/actions-status-discord@v1 | |
with: | |
webhook: ${{ secrets.DISCORD_WEBHOOK_URL_RELEASE }} | |
nodetail: true | |
username: "kilobyte-bot" | |
avatar_url: "https://avatars.githubusercontent.com/u/98578253?s=200&v=4" | |
title: "A new release has been published!" | |
description: | | |
Version `${{ github.event.release.tag_name }}` | |
Click [here](${{ github.event.release.html_url }}) to read the release notes. |