Skip to content

Update changelog-1.21.txt #7

Update changelog-1.21.txt

Update changelog-1.21.txt #7

name: Bump To Major or Minor
on: [push]
jobs:
bump-to-major-or-minor:
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, '[MAJOR]')
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1000
fetch-tags: true
- uses: BrycensRanch/read-properties-action@v1
id: version
with:
file: gradle.properties
property: mod_version
- name: Increment version variable
id: bump_version
uses: christian-draeger/increment-semantic-version@1.2.3
with:
current-version: ${{ steps.version.outputs.value }}
version-fragment: 'feature'
- name: Replace single file
uses: richardrigutins/replace-in-files@v2
with:
files: 'gradle.properties'
search-text: ${{ steps.version.outputs.value }}
replacement-text: ${{ steps.bump_version.outputs.next-version }}
- name: Append changelog file
uses: DamianReeves/write-file-action@master
with:
path: changelog-1.21.txt
write-mode: append
contents: |
- ${{ github.event.head_commit.message }}
- name: Commit & Push
uses: Andro999b/push@v1.3
with:
github_token: ${{ secrets.GIT_TOKEN}}
branch: ${{ github.ref }}
force: true