-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from solareon/qbx-bridge
feat: qbx bridge and society account creation
- Loading branch information
Showing
14 changed files
with
1,083 additions
and
1,599 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,14 @@ | ||
const fs = require('fs') | ||
|
||
const version = process.env.TGT_RELEASE_VERSION | ||
const newVersion = version.replace('v', '') | ||
|
||
const manifestFile = fs.readFileSync('fxmanifest.lua', {encoding: 'utf8'}) | ||
|
||
let newFileContent = manifestFile.replace(/\bversion\s+(.*)$/gm, `version '${newVersion}'`) | ||
|
||
if (newFileContent == manifestFile) { | ||
newFileContent = manifestFile.replace(/\bgame\s+(.*)$/gm, `game 'gta5'\nversion '${newVersion}'`); | ||
} | ||
|
||
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,39 @@ | ||
name: Main CI | ||
on: [push, pull_request] | ||
env: | ||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | ||
jobs: | ||
build: | ||
name: Build Test | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: web | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ env.BRANCH_NAME }} | ||
|
||
- name: Install pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 9 | ||
|
||
- name: Setup node environment | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
cache: "pnpm" | ||
cache-dependency-path: "web/pnpm-lock.yaml" | ||
|
||
- name: Install dependencies | ||
run: pnpm i --frozen-lockfile | ||
working-directory: web | ||
|
||
- name: Try build | ||
run: pnpm build | ||
env: | ||
CI: true |
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,63 @@ | ||
name: "Release Action" | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
env: | ||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | ||
|
||
jobs: | ||
release-action: | ||
name: "Create Release" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ env.BRANCH_NAME }} | ||
|
||
- name: Install ZIP | ||
run: sudo apt install zip | ||
|
||
- name: Install pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 9 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
cache: "pnpm" | ||
cache-dependency-path: "web/pnpm-lock.yaml" | ||
|
||
- name: Install dependencies | ||
run: pnpm i --frozen-lockfile | ||
working-directory: web | ||
|
||
- name: Run build | ||
run: pnpm build | ||
working-directory: web | ||
env: | ||
CI: false | ||
|
||
- name: Bundle files | ||
run: | | ||
shopt -s extglob | ||
mkdir -p ./temp/${{ github.event.repository.name }} | ||
mkdir -p ./temp/${{ github.event.repository.name }}/web | ||
cp ./{README.md,LICENSE,fxmanifest.lua} ./temp/${{ github.event.repository.name }} | ||
cp -r ./{client,config,server} ./temp/${{ github.event.repository.name }} | ||
cp -r ./web/public ./temp/${{ github.event.repository.name }}/web/public | ||
cd ./temp && zip -r ../${{ github.event.repository.name }}.zip ./${{ github.event.repository.name }} | ||
- name: Create Release | ||
uses: marvinpinto/action-automatic-releases@latest | ||
with: | ||
title: ${{ github.ref_name }} | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
prerelease: false | ||
files: ${{ github.event.repository.name }}.zip |
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,40 @@ | ||
name: Create New Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
required: true | ||
|
||
jobs: | ||
create-release: | ||
name: Create New Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_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 }}' | ||
|
||
- name: Push Git Tag | ||
run: | | ||
git tag ${{ inputs.version }} | ||
git push origin ${{ inputs.version }} |
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
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
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
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
Oops, something went wrong.