mirror of
https://github.com/edgegamers/Jailbreak.git
synced 2025-12-05 20:40:29 -08:00
Work on CI/CD for releases & nightlies, add GitVersion
This commit is contained in:
18
.github/release_template.md
vendored
Normal file
18
.github/release_template.md
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
[](https://edgm.rs/)⠀⠀[](https://edgm.rs/discord)⠀⠀[](https://github.com/edgegamers/Jailbreak/commits/1.0.0)
|
||||
|
||||
## Major Changes
|
||||
- **⚙️ Server**
|
||||
- **👮 Guards**
|
||||
- **🎃 Prisoners**
|
||||
- **🛕 Maps**
|
||||
|
||||
## Installing
|
||||
|
||||
To install Jailbreak, download the `jailbreak.zip` file below and extract it into your CounterStrikeSharp `plugins` directory.
|
||||
Jailbreak is ready-to-run out of the box without any additional configuration.
|
||||
|
||||
## Known Issues
|
||||
|
||||
*No known issues yet!*
|
||||
To report a bug or issue with this release, please [open an issue](https://github.com/edgegamers/Jailbreak/issues)
|
||||
19
.github/workflows/nightly.yml
vendored
19
.github/workflows/nightly.yml
vendored
@@ -7,34 +7,35 @@ on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Insert Job Version
|
||||
run: sed -i "s/{GIT_VERSION}/${{github.run_number}}/g" src/Jailbreak/Jailbreak.cs
|
||||
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
show-progress: true,
|
||||
|
||||
- name: Setup .NET SDK
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 8.0.x
|
||||
|
||||
- run: |
|
||||
dotnet restore
|
||||
dotnet build src/Jailbreak/Jailbreak.csproj --no-restore
|
||||
dotnet publish src/Jailbreak/Jailbreak.csproj --no-build --no-restore
|
||||
|
||||
|
||||
- uses: actions/upload-artifact@v4.0.0
|
||||
with:
|
||||
name: jailbreak-nightly
|
||||
path: build
|
||||
path: build/Jailbreak
|
||||
# If build didn't put any artifacts in the build folder, consider it an error
|
||||
if-no-files-found: error
|
||||
post_webhook:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/dev'
|
||||
|
||||
|
||||
steps:
|
||||
- name: POST Webhook
|
||||
run: |
|
||||
@@ -42,4 +43,4 @@ jobs:
|
||||
--fail \
|
||||
-F token=${{ secrets.GITLAB_SECRET_TOKEN }} \
|
||||
-F ref=dev \
|
||||
https://gitlab.edgegamers.io/api/v4/projects/2594/trigger/pipeline
|
||||
https://gitlab.edgegamers.io/api/v4/projects/2594/trigger/pipeline
|
||||
|
||||
43
.github/workflows/release.yml
vendored
Normal file
43
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- "*"
|
||||
tags:
|
||||
- "*"
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
show-progress: true,
|
||||
|
||||
- name: Setup .NET SDK
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 8.0.x
|
||||
|
||||
- run: |
|
||||
dotnet restore
|
||||
dotnet build src/Jailbreak/Jailbreak.csproj --no-restore
|
||||
dotnet publish src/Jailbreak/Jailbreak.csproj --no-build --no-restore
|
||||
|
||||
- uses: actions/upload-artifact@v4.0.0
|
||||
with:
|
||||
name: jailbreak
|
||||
path: build/Jailbreak
|
||||
# If build didn't put any artifacts in the build folder, consider it an error
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
draft: true
|
||||
fail_on_unmatched_files: true
|
||||
files: build/Jailbreak.zip
|
||||
body_path: .github/release_template.md
|
||||
@@ -29,7 +29,7 @@ public class Jailbreak : BasePlugin
|
||||
public override string ModuleName => "Jailbreak";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string ModuleVersion => "1.0.0.{GIT_VERSION}";
|
||||
public override string ModuleVersion => $"{GitVersionInformation.SemVer} ({GitVersionInformation.ShortSha})";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string ModuleAuthor => "EdgeGamers Development";
|
||||
@@ -74,4 +74,4 @@ public class Jailbreak : BasePlugin
|
||||
|
||||
base.Unload(hotReload);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,10 +18,34 @@
|
||||
<!--CI Configurations-->
|
||||
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<!--GitVersion Configuration-->
|
||||
<UpdateAssemblyInfo>true</UpdateAssemblyInfo>
|
||||
<UpdateVersionProperties>true</UpdateVersionProperties>
|
||||
|
||||
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
|
||||
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
|
||||
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
|
||||
|
||||
<GitVersion_NoFetchEnabled>false</GitVersion_NoFetchEnabled>
|
||||
<GitVersion_NoCacheEnabled>true</GitVersion_NoCacheEnabled>
|
||||
|
||||
<GitVersion_ToolArgments>$(GitVersion_ToolArgments) /verbosity Normal</GitVersion_ToolArgments>
|
||||
<GitVersion_ToolArgments>$(GitVersion_ToolArgments) /overrideconfig mode=ContinuousDelivery</GitVersion_ToolArgments>
|
||||
<GitVersion_ToolArgments>$(GitVersion_ToolArgments) /overrideconfig assembly-file-versioning-format="{SemVer}"</GitVersion_ToolArgments>
|
||||
<GitVersion_ToolArgments>$(GitVersion_ToolArgments) /overrideconfig assembly-versioning-format="{Major}.{Minor}.{Patch}.{CommitsSinceVersionSource}"</GitVersion_ToolArgments>
|
||||
<GitVersion_ToolArgments>$(GitVersion_ToolArgments) /overrideconfig assembly-informational-format="{FullSemVer}{EscapedBranchName}"</GitVersion_ToolArgments>
|
||||
<GitVersion_ToolArgments>$(GitVersion_ToolArgments) /overrideconfig commit-message-incrementing=Disabled</GitVersion_ToolArgments>
|
||||
<GitVersion_ToolArgments>$(GitVersion_ToolArgments) /overrideconfig increment=Patch</GitVersion_ToolArgments>
|
||||
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<!--Publish Configuration-->
|
||||
<PublishDir>$(MSBuildThisFileDirectory)/../../build/Jailbreak</PublishDir>
|
||||
<PublishBaseDirectory>$(MSBuildThisFileDirectory)/../../build</PublishBaseDirectory>
|
||||
<PublishDir>$(PublishBaseDirectory)/Jailbreak</PublishDir>
|
||||
|
||||
<PublishRelease>false</PublishRelease>
|
||||
<PublishSelfContained>false</PublishSelfContained>
|
||||
<PublishDocumentationFile>true</PublishDocumentationFile>
|
||||
@@ -42,4 +66,18 @@
|
||||
<ProjectReference Include="..\Jailbreak.Generic\Jailbreak.Generic.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="GitVersion.MsBuild" Version="6.0.0-beta.5">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="ZipOutputPath" AfterTargets="Publish">
|
||||
<ZipDirectory
|
||||
Overwrite="true"
|
||||
SourceDirectory="$(PublishDir)\"
|
||||
DestinationFile="$(PublishBaseDirectory)\Jailbreak.zip" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user