Skip to content

Commit

Permalink
chore(ci): adding release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
wllfaria committed Aug 17, 2024
1 parent 3ddf73e commit dfd1388
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
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 -A
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 }}

0 comments on commit dfd1388

Please sign in to comment.