mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-03 22:20:56 +00:00
feat(ci): Automatic fxmanifest bumping
This commit is contained in:
1 parent
23bcf90885
commit
b8d2e16ed6
2 files changed
+33
-1
No files matched your search
@@ -0,0 +1,10 @@
|
|||||||
|
const fs = require('fs')
|
||||||
|
|
||||||
|
const version = process.env.TGT_RELEASE_VERSION
|
||||||
|
const newVersion = version.replace('v', '')
|
||||||
|
|
||||||
|
const manifestFile = fs.readFileSync('fxmanifest.lua', {encoding: 'utf8'})
|
||||||
|
|
||||||
|
const newFileContent = manifestFile.replace(/\bversion\s+(.*)$/gm, `version '${newVersion}'`)
|
||||||
|
|
||||||
|
fs.writeFileSync('fxmanifest.lua', newFileContent)
|
||||||
@@ -9,7 +9,6 @@ jobs:
|
|||||||
create-release:
|
create-release:
|
||||||
name: Build and Create Tagged Release
|
name: Build and Create Tagged Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install archive tools
|
- name: Install archive tools
|
||||||
run: sudo apt install zip
|
run: sudo apt install zip
|
||||||
@@ -62,3 +61,26 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CI: false
|
CI: false
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
bump-manifest-version:
|
||||||
|
name: 'Bump fxmanifest version'
|
||||||
|
needs: create-release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Get tag
|
||||||
|
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: main
|
||||||
|
- name: Bump manifest version
|
||||||
|
run: node .github/actions/bump-manifest-version.js
|
||||||
|
env:
|
||||||
|
TGT_RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
|
||||||
|
- name: Push manifest change
|
||||||
|
uses: EndBug/add-and-commit@v8
|
||||||
|
with:
|
||||||
|
add: fxmanifest.lua
|
||||||
|
push: true
|
||||||
|
author_name: Manifest Bumper
|
||||||
|
author_email: 41898282+github-actions[bot]@users.noreply.github.com
|
||||||
|
message: 'chore(bump-manifest): Bump manifest version to ${{ env.RELEASE_VERSION }}'
|
||||||
Reference in new issue
Block a user