Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan2139 committed Oct 25, 2024
2 parents c8d13c6 + eafe6a7 commit 6745450
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 4 deletions.
45 changes: 43 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: Sonoran CAD Framework Release
name: Sonoran CAD Framework Resource Build

on:
push:
branches:
- master
- '**' # This will trigger on all branches

jobs:
release:
if: github.ref == 'refs/heads/master' # Run only on master branch
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -84,4 +86,43 @@ jobs:
-H "Content-Type: application/zip" \
--data-binary "@sonorancad-$VERSION.zip" \
"$UPLOAD_URL"
shell: bash
shell: bash

upload-artifact:
if: github.ref != 'refs/heads/master' # Run only on non-master branches
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Extract Version
id: extract-version
run: |
VERSION=$(grep -oP "version '\K\d+\.\d+\.\d+" sonorancad/fxmanifest.lua)
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "Grabbed version number of $VERSION, will be used for this artifact..."
shell: bash

- name: Clone included submodules
id: clone-submodules
run: |
git clone https://github.com/Sonoran-Software/wk_wars2x.git wk_wars2x
git clone https://github.com/Sonoran-Software/id_card_ui.git sonoran_idcard
shell: bash

- name: Cleanup & Zip Directories
id: zip-dirs
run: |
VERSION=${{ steps.extract-version.outputs.version }}
find sonorancad/plugins -mindepth 1 -type d -exec sh -c 'case "$0" in */readme.md|*/template) ;; *) rm -r "$0" ;; esac' {} \; & wait
rsync -a --exclude="[sonorancad]" --exclude=".git" --exclude=".vscode" --exclude=".github" ./ ./[sonorancad]
zip -r "sonorancad-$VERSION.zip" [sonorancad]/
echo "Zipped sonorancad/ and sonorancad_updatehelper/ directories"
shell: bash

- name: Upload ZIP as Artifact
uses: actions/upload-artifact@v4
with:
name: sonorancad-artifact
path: sonorancad-*.zip
2 changes: 1 addition & 1 deletion sonorancad/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ games {'gta5'}

author 'Sonoran CAD'
description 'Sonoran CAD FiveM Integration'
version '2.9.33'
version '3.0.0'

server_scripts {
'core/http.js'
Expand Down
2 changes: 1 addition & 1 deletion sonorancad/version.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"resource" : "2.9.33",
"resource" : "3.0.0",
"testedFxServerVersion": "5932"
}

0 comments on commit 6745450

Please sign in to comment.