Skip to content

chore(ci): adding release workflow #2

chore(ci): adding release workflow

chore(ci): adding release workflow #2

Workflow file for this run

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 }}