Skip to content

Commit

Permalink
Need to update file before creating version
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Nov 22, 2023
1 parent cb06623 commit 1506bbf
Showing 1 changed file with 32 additions and 15 deletions.
47 changes: 32 additions & 15 deletions .github/workflows/bumpversion.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,46 @@
name: Bump version
name: Update file on PR merge
on:
push:
pull_request:
branches:
- main
types: closed

jobs:
build:
update_date:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: checkout
uses: actions/checkout@v3
with:
# Fetch full depth, otherwise the last step overwrites the last commit's parent, essentially removing the graph.
fetch-depth: 0

- name: GenerateTag
id: name_tag
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
create_annotated_tag: true
default_bump: patch
dry_run: true
tag_prefix: manic-
- name: Update version.txt
run: |
echo "${{ steps.name_tag.outputs.new_tag }}" > version.txt
- name: Amend the last commit
run: |
git config --global user.email "[email protected]"
git config --global user.name "OpenRCT2 git bot"
git commit -a --amend --no-edit
git push --force-with-lease
echo "Complete"name: Bump version
- name: Bump version and push tag
id: tag_version
id: really_tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
create_annotated_tag: true
default_bump: patch
dry_run: false
tag_prefix: manic-
write-version:
runs-on: ubuntu-latest
name: Write Version to File
steps:
- uses: actions/checkout@master
- name: Update version
uses: brettdorrans/[email protected]
with:
filename: '/.version.txt'
placeholder: '${VERSION}'

0 comments on commit 1506bbf

Please sign in to comment.