Skip to content

Commit

Permalink
add .info file for cs2-update-manager
Browse files Browse the repository at this point in the history
  • Loading branch information
Kalle Minkner committed Nov 8, 2024
1 parent d9f5f87 commit 03c9ebe
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
REPOSITORY_FOLDER: "src" # subfolder with source code
REPOSITORY_MAIN_FILE: "MapModifiers.cs" # main file of the project
PLUGIN_NAME: "MapModifiers" # main file of the project

jobs:
create-release:
Expand All @@ -21,10 +21,10 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Get Current Project Version Number From ${{ env.REPOSITORY_MAIN_FILE }}
- name: Get Current Project Version Number From ${{ env.PLUGIN_NAME }}.cs
id: get_version
run: |
version=$(grep -oP '(?<=ModuleVersion => ")[^"]*' ${{ env.REPOSITORY_FOLDER }}/${{ env.REPOSITORY_MAIN_FILE }})
version=$(grep -oP '(?<=ModuleVersion => ")[^"]*' ${{ env.REPOSITORY_FOLDER }}/${{ env.PLUGIN_NAME }}.cs)
echo "version=$version" >> $GITHUB_ENV
- name: Get Current Release Version Number
Expand Down Expand Up @@ -56,14 +56,20 @@ jobs:
if: env.new_version == 'true'
run: dotnet publish -c Release

- name: Prepare CS2-UpdateManager ${{ env.REPOSITORY_NAME }}.info
if: env.new_version == 'true'
run: |
echo "version: ${{ env.version }}" > /home/runner/work/${{ env.REPOSITORY_NAME }}/${{ env.REPOSITORY_NAME }}/${{ env.REPOSITORY_FOLDER }}/bin/Release/net8.0/publish/${{ env.PLUGIN_NAME }}.info
echo "repository: https://github.com/${{ github.repository }}" >> /home/runner/work/${{ env.REPOSITORY_NAME }}/${{ env.REPOSITORY_NAME }}/${{ env.REPOSITORY_FOLDER }}/bin/Release/net8.0/publish/${{ env.PLUGIN_NAME }}.info
- name: Prepare Release
if: env.new_version == 'true'
run: |
mv /home/runner/work/${{ env.REPOSITORY_NAME }}/${{ env.REPOSITORY_NAME }}/${{ env.REPOSITORY_FOLDER }}/bin/Release/net8.0/publish/ /home/runner/work/${{ env.REPOSITORY_NAME }}/${{ env.REPOSITORY_NAME }}/${{ env.REPOSITORY_FOLDER }}/bin/Release/net8.0/${{ env.REPOSITORY_FOLDER }}/
mv /home/runner/work/${{ env.REPOSITORY_NAME }}/${{ env.REPOSITORY_NAME }}/${{ env.REPOSITORY_FOLDER }}/bin/Release/net8.0/publish/ /home/runner/work/${{ env.REPOSITORY_NAME }}/${{ env.REPOSITORY_NAME }}/${{ env.REPOSITORY_FOLDER }}/bin/Release/net8.0/${{ env.PLUGIN_NAME }}/
- name: Compress Release
if: env.new_version == 'true'
run: cd /home/runner/work/${{ env.REPOSITORY_NAME }}/${{ env.REPOSITORY_NAME }}/${{ env.REPOSITORY_FOLDER }}/bin/Release/net8.0 && zip -r /home/runner/work/${{ env.REPOSITORY_NAME }}-${{ env.version }}.zip ${{ env.REPOSITORY_FOLDER }}
run: cd /home/runner/work/${{ env.REPOSITORY_NAME }}/${{ env.REPOSITORY_NAME }}/${{ env.REPOSITORY_FOLDER }}/bin/Release/net8.0 && zip -r /home/runner/work/${{ env.REPOSITORY_NAME }}-${{ env.version }}.zip ${{ env.PLUGIN_NAME }}

- name: Build Release Notes
if: env.new_version == 'true'
Expand Down
2 changes: 1 addition & 1 deletion cs2-map-modifiers.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.002.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MapModifiers", "MapModifiers\MapModifiers.csproj", "{BE637A13-353A-4BB3-98E5-3C9A6FE12B2E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MapModifiers", "src\MapModifiers.csproj", "{BE637A13-353A-4BB3-98E5-3C9A6FE12B2E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
2 changes: 1 addition & 1 deletion src/MapModifiers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public partial class MapModifiers : BasePlugin, IPluginConfig<PluginConfig>
{
public override string ModuleName => "Map Modifiers Plugin";
public override string ModuleAuthor => "Jon-Mailes Graeffe <[email protected]> / Kalle <[email protected]>";
public override string ModuleVersion => "0.0.11";
public override string ModuleVersion => "0.0.12";

private string _currentMap = "";

Expand Down

0 comments on commit 03c9ebe

Please sign in to comment.