Skip to content

feat: Extract current version from VERSION file #32

feat: Extract current version from VERSION file

feat: Extract current version from VERSION file #32

name: Create Release and Tag on Merge
on:
push:
# pull_request:
# types: [closed]
jobs:
create-release:
# if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'master'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Extract current version
id: extract_version
run: |
# Extract the current version from the VERSION file
VERSION=$(cat VERSION)
echo "Current version: $VERSION"
echo "::set-output name=current_version::$VERSION"
- uses: paulhatch/[email protected]
id: generate-version
with:
tag_prefix: "st4-"
major_pattern: "(MAJOR)"
minor_pattern: "(MINOR)"
version_format: "st4-${major}.${minor}.${patch}"
- name: Create Release
id: create-release
uses: undergroundwires/[email protected]
with:
git-token: ${{ secrets.ACTION_TOKEN }}
release-token: ${{ secrets.ACTION_TOKEN }}