Skip to content

Commit

Permalink
Create version.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkenJaden authored Dec 20, 2023
1 parent d1a8ec3 commit 54b93de
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Change version pipeline

on:
workflow_dispatch:
inputs:
version:
description: 'Version number for this release'
required: true
default: '1.2.0'
type: string
suffix:
description: 'Suffix to this release'
required: false
type: string

jobs:
versioncommit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
- name: Replace version number with new version
run: |
sed -i 's/public static final String VERSION.*/public static final String VERSION = "${{ inputs.version }}";/' src/main/java/net/landofrails/landofsignals/LandOfSignals.java
sed -i '0,/"version":.*/s//"version": "${{ inputs.version }}",/' ./umc.json
echo ${{ inputs.version }} > .\VERSION
echo ${{ inputs.suffix }} > .\SUFFIX
- name: Commit and push changes
run: |
git config --global user.name "MarkenJaden"
git config --global user.email "jjsch1410@gmail.com"
git add -A
git diff-index --quiet HEAD || git commit -m "Updated mod version"
git push

0 comments on commit 54b93de

Please sign in to comment.