-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/tonybynMp4/qbx_camera
- Loading branch information
Showing
4 changed files
with
137 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
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 versionStr = `version '${newVersion}'` | ||
let newFileContent = manifestFile.replace(/\bversion\s+(.*)$/gm, versionStr) | ||
|
||
if (!newFileContent.includes(versionStr)) { | ||
newFileContent = manifestFile.replace(/\bgame\s+(.*)$/gm, `game 'gta5'\n${versionStr}`); | ||
} | ||
|
||
fs.writeFileSync('fxmanifest.lua', newFileContent) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Lint | ||
on: [push, pull_request_target] | ||
jobs: | ||
lint: | ||
name: Lint Resource | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Lint | ||
uses: iLLeniumStudios/fivem-lua-lint-action@v2 | ||
with: | ||
capture: "junit.xml" | ||
args: "-t --formatter JUnit" | ||
extra_libs: ox_lib+mysql+qblocales+qbox+qbox_playerdata+qbox_lib | ||
- name: Generate Lint Report | ||
if: always() | ||
uses: mikepenz/action-junit-report@v4 | ||
with: | ||
report_paths: "**/junit.xml" | ||
check_name: Linting Report | ||
fail_on_failure: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: "release-action" | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
release-action: | ||
name: "Create Release" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.event.repository.default_branch }} | ||
|
||
- name: Install ZIP | ||
run: sudo apt install zip | ||
|
||
- name: Bundle files | ||
run: | | ||
rm -rf ./.github ./.git | ||
shopt -s extglob | ||
mkdir ./${{ github.event.repository.name }} | ||
cp -r !(${{ github.event.repository.name }}) ${{ github.event.repository.name }} | ||
zip -r ./${{ github.event.repository.name }}.zip ./${{ github.event.repository.name }} | ||
- name: Get App Token | ||
uses: actions/create-github-app-token@v1 | ||
id: generate_token | ||
with: | ||
app-id: ${{ secrets.APP_ID }} | ||
private-key: ${{ secrets.PRIVATE_KEY }} | ||
|
||
- name: Update CHANGELOG | ||
id: changelog | ||
uses: requarks/changelog-action@v1 | ||
with: | ||
token: ${{ steps.generate_token.outputs.token }} | ||
tag: ${{ github.ref_name }} | ||
includeInvalidCommits: true | ||
useGitmojis: false | ||
writeToFile: false | ||
|
||
- name: Create Release | ||
uses: ncipollo/[email protected] | ||
with: | ||
allowUpdates: true | ||
draft: false | ||
makeLatest: true | ||
name: ${{ github.ref_name }} | ||
tag: ${{ github.ref_name }} | ||
body: ${{ steps.changelog.outputs.changes }} | ||
artifacts: ${{ github.event.repository.name }}.zip | ||
token: ${{ steps.generate_token.outputs.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Create New Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
required: true | ||
|
||
jobs: | ||
create-release: | ||
name: Create New Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get App Token | ||
uses: actions/create-github-app-token@v1 | ||
id: generate_token | ||
with: | ||
app-id: ${{ secrets.APP_ID }} | ||
private-key: ${{ secrets.PRIVATE_KEY }} | ||
|
||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ steps.generate_token.outputs.token }} | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Bump manifest version | ||
run: node .github/actions/bump-manifest-version.js | ||
env: | ||
TGT_RELEASE_VERSION: ${{ inputs.version }} | ||
|
||
- name: Push manifest change | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
add: fxmanifest.lua | ||
push: true | ||
message: 'chore: bump manifest version to ${{ inputs.version }}' | ||
tag: ${{ inputs.version }} |