mirror of
https://github.com/KAMKEEL/CustomNPC-Gecko-Addon.git
synced 2026-11-11 19:37:41 +00:00
40 lines
1.3 KiB
YAML
40 lines
1.3 KiB
YAML
# This workflow only meant for the source mod you shouldn't bring it into your own project
|
|
|
|
name: Buildscript maintenance
|
|
|
|
on:
|
|
push:
|
|
branches: [ master, main ]
|
|
paths:
|
|
- build.gradle
|
|
workflow_dispatch: { }
|
|
|
|
jobs:
|
|
buildscript-maintenance:
|
|
runs-on: ubuntu-latest
|
|
# Avoid running this workflow on forks
|
|
if: github.repository == 'GTNewHorizons/ExampleMod1.7.10'
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Ensure build script version is up to date
|
|
id: update-buildscript
|
|
run: |
|
|
new_version="$(date +%s)"
|
|
sed --in-place "1s!^//version:.*!//version: $new_version!g" build.gradle
|
|
echo "::set-output name=new_version::$new_version"
|
|
|
|
- name: Create Pull Request
|
|
id: create-pull-request
|
|
uses: peter-evans/create-pull-request@v4
|
|
with:
|
|
add-paths: build.gradle
|
|
commit-message: '[ci skip] update build script version to ${{ steps.update-buildscript.outputs.new_version }}'
|
|
branch: buildscript-maintenance
|
|
title: Update build script version to ${{ steps.update-buildscript.outputs.new_version }}
|
|
body: This pull request is created by the buildscript-maintenance workflow
|