Skip to content

Merge pull request #3 from includeamin/improve-interface #8

Merge pull request #3 from includeamin/improve-interface

Merge pull request #3 from includeamin/improve-interface #8

Workflow file for this run

on:
push:
branches:
- main
jobs:
release-on-push:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
steps:
- uses: actions/checkout@v4
- id: release
uses: rymndhng/release-on-push-action@master
with:
bump_version_scheme: minor
tag_prefix: v
# Step 2: Generate Changelog using git-cliff-action
- name: Generate Changelog with GitCliff
uses: orhun/git-cliff-action@v1
with:
args: "-o CHANGELOG.md"
config: 'cliff.toml'
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
# Step 4: Check Output Parameters (optional, for debugging)
- name: Check Output Parameters
run: |
echo "Got tag name ${{ steps.release.outputs.tag_name }}"
echo "Got release version ${{ steps.release.outputs.version }}"
echo "Upload release artifacts to ${{ steps.release.outputs.upload_url }}"
# Step 5: Set release body with changelog
- name: Set release body with changelog
id: release_body
run: |
ls -l # List files to check if CHANGELOG.md exists
if [ -f CHANGELOG.md ]; then
echo "CHANGELOG.md exists"
echo "body<<EOF" >> $GITHUB_ENV
cat CHANGELOG.md >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
else
echo "CHANGELOG.md does not exist"
echo "body=No changelog available" >> $GITHUB_ENV
fi
# Step 6: Create GitHub Release with Changelog in Release Notes
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.release.outputs.tag_name }}
files: ./artifacts/*
body: ${{ steps.release_body.outputs.body }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}