Skip to content

Release pipeline with changelog.md only (#38) #1

Release pipeline with changelog.md only (#38)

Release pipeline with changelog.md only (#38) #1

name: check-for-new-release
on:
push:
branches:
- 'master'
jobs:
tag:
runs-on: ubuntu-latest
outputs:
tagcreated: ${{steps.tag-step.outputs.tagcreated}}
tagname: ${{steps.tag-step.outputs.tagname}}
steps:
- uses: actions/checkout@v4
- id: extract-version-step
run: |
echo "version=$(./cicd/version.sh)" >> $GITHUB_ENV
- id: tag-step
uses: butlerlogic/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
root: "./CHANGELOG.md"
tag_prefix: "v"
regex_pattern: '##[\s]*([0-9\.]{3,})'
publish-release:
runs-on: ubuntu-latest
needs: tag
if: ${{ needs.tag.outputs.tagcreated == 'yes' }}
steps:
- uses: actions/checkout@v4
- name: Build
run: |
make build-in-docker
- name: Generate Changelog
run: |
VERSION=$(cicd/version.sh)
cicd/changelog.sh $VERSION > bin/CHANGELOG.md
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
body_path: bin/CHANGELOG.md
files: bin/ydbops*
tag_name: ${{ needs.tag.outputs.tagname }}
env:
GITHUB_TOKEN: ${{ github.token }}