From 10115ca03604b31615420ac3cbba7903b8f96ee6 Mon Sep 17 00:00:00 2001 From: B3none Date: Thu, 11 Jan 2024 01:36:24 +0000 Subject: [PATCH 01/10] update build.yml --- .github/workflows/build.yml | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6a4016e..982e4c6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,17 +11,19 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 7.0.x - - name: Restore dependencies - run: dotnet restore - - name: Build - run: dotnet build --no-restore - - name: Publish DLL artifact - uses: actions/upload-artifact@v4 - with: - name: RetakesPlugin-${{ github.sha }} - path: ./bin/Debug/net7.0/RetakesPlugin.dll + - uses: actions/checkout@v3 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 7.0.x + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --no-restore + - name: Zip Files + run: zip -r RetakesPlugin.zip ./bin/Debug/net7.0/RetakesPlugin.dll ./map_configs ./lang + - name: Publish Artifact + uses: actions/upload-artifact@v4 + with: + name: RetakesPlugin-${{ github.sha }} + path: RetakesPlugin.zip From 3c0b2b82f1140d6b568e55632933ea7b0db8d6e6 Mon Sep 17 00:00:00 2001 From: B3none Date: Thu, 11 Jan 2024 01:37:40 +0000 Subject: [PATCH 02/10] temp update on key --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 982e4c6..ec245d5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,9 +2,9 @@ name: Build the plugin on: push: - branches: [ "master" ] + branches: [ "master", "actions-build-zip" ] pull_request: - branches: [ "master" ] + branches: [ "master", "actions-build-zip" ] jobs: build: From 21806b8c847ae6bd565abf597a71eaa744afa8d9 Mon Sep 17 00:00:00 2001 From: B3none Date: Thu, 11 Jan 2024 01:40:12 +0000 Subject: [PATCH 03/10] Update build.yml --- .github/workflows/build.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ec245d5..9fe46f3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,10 +20,16 @@ jobs: run: dotnet restore - name: Build run: dotnet build --no-restore - - name: Zip Files - run: zip -r RetakesPlugin.zip ./bin/Debug/net7.0/RetakesPlugin.dll ./map_configs ./lang + - name: Create Zip + run: | + mkdir RetakesPluginZip + mv ./bin/Debug/net7.0/RetakesPlugin.dll RetakesPluginZip/ + mv ./map_configs RetakesPluginZip/ + mv ./lang RetakesPluginZip/ + zip -r RetakesPlugin.zip RetakesPluginZip/ - name: Publish Artifact uses: actions/upload-artifact@v4 with: name: RetakesPlugin-${{ github.sha }} path: RetakesPlugin.zip + \ No newline at end of file From d02c6062c5c40ddca0951a3ed1c661441f4f2cf1 Mon Sep 17 00:00:00 2001 From: B3none Date: Thu, 11 Jan 2024 01:41:59 +0000 Subject: [PATCH 04/10] Continued tweaks --- .github/workflows/build.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9fe46f3..d216208 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,14 +22,13 @@ jobs: run: dotnet build --no-restore - name: Create Zip run: | - mkdir RetakesPluginZip - mv ./bin/Debug/net7.0/RetakesPlugin.dll RetakesPluginZip/ - mv ./map_configs RetakesPluginZip/ - mv ./lang RetakesPluginZip/ - zip -r RetakesPlugin.zip RetakesPluginZip/ + mkdir RetakesPlugin + mv ./bin/Debug/net7.0/RetakesPlugin.dll RetakesPlugin/ + mv ./map_configs RetakesPlugin/ + mv ./lang RetakesPlugin/ - name: Publish Artifact uses: actions/upload-artifact@v4 with: name: RetakesPlugin-${{ github.sha }} - path: RetakesPlugin.zip + path: RetakesPluginZip/ \ No newline at end of file From d9a0138195dd15ca1db80877aa00cf0ab765186d Mon Sep 17 00:00:00 2001 From: B3none Date: Thu, 11 Jan 2024 01:42:45 +0000 Subject: [PATCH 05/10] Fix typo --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d216208..42e9c29 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,5 +30,5 @@ jobs: uses: actions/upload-artifact@v4 with: name: RetakesPlugin-${{ github.sha }} - path: RetakesPluginZip/ + path: RetakesPlugin/ \ No newline at end of file From 3c5897efc76e02fc75b1322b9b63dd1fa7451859 Mon Sep 17 00:00:00 2001 From: B3none Date: Thu, 11 Jan 2024 01:44:59 +0000 Subject: [PATCH 06/10] another tweak --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 42e9c29..196509a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,13 +22,13 @@ jobs: run: dotnet build --no-restore - name: Create Zip run: | - mkdir RetakesPlugin - mv ./bin/Debug/net7.0/RetakesPlugin.dll RetakesPlugin/ - mv ./map_configs RetakesPlugin/ - mv ./lang RetakesPlugin/ + mkdir output/RetakesPlugin + mv ./bin/Debug/net7.0/RetakesPlugin.dll output/RetakesPlugin/ + mv ./map_configs output/RetakesPlugin/ + mv ./lang output/RetakesPlugin/ - name: Publish Artifact uses: actions/upload-artifact@v4 with: name: RetakesPlugin-${{ github.sha }} - path: RetakesPlugin/ + path: output \ No newline at end of file From e958d1e3090fae33e11a888d2c0a04e79866b94c Mon Sep 17 00:00:00 2001 From: B3none Date: Thu, 11 Jan 2024 01:46:43 +0000 Subject: [PATCH 07/10] latest --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 196509a..ec00c16 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,9 +20,9 @@ jobs: run: dotnet restore - name: Build run: dotnet build --no-restore - - name: Create Zip + - name: Create output directory run: | - mkdir output/RetakesPlugin + mkdir -p output/RetakesPlugin mv ./bin/Debug/net7.0/RetakesPlugin.dll output/RetakesPlugin/ mv ./map_configs output/RetakesPlugin/ mv ./lang output/RetakesPlugin/ From 762cb058c7f14120dc4baf0dfe542f48cb328423 Mon Sep 17 00:00:00 2001 From: B3none Date: Thu, 11 Jan 2024 01:48:05 +0000 Subject: [PATCH 08/10] Remove redundant dotnet restore, remove --no-restore flag on dotnet build --- .github/workflows/build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ec00c16..2c5b428 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,10 +16,8 @@ jobs: uses: actions/setup-dotnet@v3 with: dotnet-version: 7.0.x - - name: Restore dependencies - run: dotnet restore - name: Build - run: dotnet build --no-restore + run: dotnet build - name: Create output directory run: | mkdir -p output/RetakesPlugin From 10689c388f7bd5a4af44b17846b42ce773400325 Mon Sep 17 00:00:00 2001 From: B3none Date: Thu, 11 Jan 2024 01:54:51 +0000 Subject: [PATCH 09/10] Updated build.yml --- .github/workflows/build.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2c5b428..09ba04d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,9 @@ on: branches: [ "master", "actions-build-zip" ] pull_request: branches: [ "master", "actions-build-zip" ] + release: + types: + - created jobs: build: @@ -29,4 +32,20 @@ jobs: with: name: RetakesPlugin-${{ github.sha }} path: output - \ No newline at end of file + + release: + needs: build + runs-on: ubuntu-latest + if: github.event_name == 'release' + + steps: + - name: Extract Release Version + id: extract-release-version + run: echo "RELEASE_VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + with: + asset-path: ${{ github.workspace }}/RetakesPlugin.zip + asset-name: "cs2-retakes-${{ env.RELEASE_VERSION }}.zip" + repo-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From a2d46580b4fd2378ac592fd67bb8e6d7ed2106ae Mon Sep 17 00:00:00 2001 From: B3none Date: Thu, 11 Jan 2024 01:57:28 +0000 Subject: [PATCH 10/10] Removed test branches from build.yml --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 09ba04d..c5286f8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,9 +2,9 @@ name: Build the plugin on: push: - branches: [ "master", "actions-build-zip" ] + branches: [ "master" ] pull_request: - branches: [ "master", "actions-build-zip" ] + branches: [ "master" ] release: types: - created @@ -48,4 +48,4 @@ jobs: with: asset-path: ${{ github.workspace }}/RetakesPlugin.zip asset-name: "cs2-retakes-${{ env.RELEASE_VERSION }}.zip" - repo-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + repo-token: ${{ secrets.GITHUB_TOKEN }}