Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dsbilling committed Jan 9, 2025
1 parent 7741556 commit 8a946b6
Showing 1 changed file with 7 additions and 26 deletions.
33 changes: 7 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,11 @@ jobs:
npm version ${{ github.event.release.tag_name }}
cd ..
- name: Commit updated package.json
uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: ${{ env.TARGET_BRANCH }}
commit_message: Update version in package.json
file_pattern: package.json

- name: Update version in backend/config.py
run: |
sed -i "s/API_DOCS_VERSION = '.*'/API_DOCS_VERSION = '${{ github.event.release.tag_name }}'/g" backend/config.py
- name: Commit updated backend/config.py
uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: ${{ env.TARGET_BRANCH }}
commit_message: Update version in backend/config.py
file_pattern: backend/config.py
cd backend
sed -i "s/API_DOCS_VERSION = '.*'/API_DOCS_VERSION = '${{ github.event.release.tag_name }}'/g" config.py
cd ..
- name: Update changelog
uses: stefanzweifel/changelog-updater-action@v1
Expand All @@ -50,17 +38,10 @@ jobs:
uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: ${{ env.TARGET_BRANCH }}
commit_message: Update changelog
file_pattern: CHANGELOG.md

- name: Move tag to current commit
run: |
git tag -f ${{ github.event.release.tag_name }}
- name: Push changes
run: |
git push origin ${{ env.TARGET_BRANCH }}
git push origin ${{ github.event.release.tag_name }}
commit_message: Release version ${{ github.event.release.tag_name }}
file_pattern: 'CHANGELOG.md, frontend/package.json, backend/config.py'
tagging_message: ${{ github.event.release.tag_name }}
push_options: '--force'

- name: "Send webhook to Discord"
uses: sarisia/actions-status-discord@v1
Expand Down

0 comments on commit 8a946b6

Please sign in to comment.