Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/test version bump #29

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/version-bump.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Version Bump

on:
pull_request:
types:
- closed
branches:
- 'main'

jobs:
check_and_bump_version:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup nodejs
uses: actions/setup-node@v4
with:
node-version: '20.x'

- run: npm ci

- run: |

echo The PR was merged

if git diff --name-only ${{ toJson(github.event.pull_request.base.sha) }} ${{ toJson(github.event.pull_request.head.sha) }} | grep fate-product-list.csv
then
# Note: the following account information will not work on GHES
# Taken from the checkout github action, used above, at https://github.com/actions/checkout
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

if npm version major -m "Version updated to %s because product list changed."
then
echo "Version updated to " $( jq .version package.json ) "."
git push --follow-tags
else
echo "Couldn't update version for some reason."
fi
else
echo "No changes to product list."
fi

1 change: 1 addition & 0 deletions fate-product-list.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ A.C. Luke,Heartbreaker,https://ac-luke.itch.io/heartbreaker-trifold
A.C. Luke,Seven Demons: A Collection of NPCs for Fate Core,https://ac-luke.itch.io/fate-seven-demons
A.C. Luke,Seven Hunters: A Collection of NPCs for Fate Core,https://ac-luke.itch.io/fate-seven-hunters
A.C. Luke,Seven Spirits: A Fate Supplement,https://ac-luke.itch.io/fate-seven-spirits
ABC,Example Game,https://example.com/example-game
Alex Costello,According To Plan,https://www.drivethrurpg.com/product/302251/According-To-Plan?affiliate_id=144937
Amazing Rando Design,The Book of Hanz,https://fate-srd.com/store
Amazing Rando Design,Thoughts on Fate: A Collection of Essays on the Fate RPG,https://www.drivethrurpg.com/product/176051/Thoughts-on-Fate-A-Collection-of-Essays-on-the-Fate-RPG?affiliate_id=144937
Expand Down