chore(ci): adding release workflow #2
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 Workflow | |
on: | |
push: | |
tags: | |
- '*' | |
permissions: | |
contents: write | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: checkout to main | |
run: git checkout main | |
- name: Generate CHANGELOG using GitHub Action | |
uses: TriPSs/conventional-changelog-action@v5 | |
with: | |
version: ${{ github.ref_name }} | |
output: CHANGELOG.md | |
- name: Commit and push changelog (optional, only if generating in CI) | |
run: | | |
git add CHANGELOG.md | |
git commit -m "chore(release): update changelog for ${{ github.ref_name }}" | |
git push | |
- name: Create GitHub Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
body_path: CHANGELOG.md | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |