From 4570c4b5f4e284d064907003adbfaf78a032b6ec Mon Sep 17 00:00:00 2001 From: defnotken Date: Tue, 26 Aug 2025 11:14:35 -0500 Subject: [PATCH 01/17] Testing out tag and release --- .../workflows/lightless-tag-and-release.yml | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/lightless-tag-and-release.yml diff --git a/.github/workflows/lightless-tag-and-release.yml b/.github/workflows/lightless-tag-and-release.yml new file mode 100644 index 0000000..8acca0e --- /dev/null +++ b/.github/workflows/lightless-tag-and-release.yml @@ -0,0 +1,40 @@ +name: Tag and Release Lightless + +on: + push: + branches: [ master ] + +jobs: + tag-and-release: + runs-on: ubuntu-latest + + steps: + - name: checkout lightless + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: get version from lightless proj + id: get_version + run: | + VERSION=$(xmllint --xpath "string(//Version)" LightlessSync/LightlessSync.csproj) + echo "VERSION=$VERSION" >> $GITHUB_ENV + + - name: Create Git tag + run: | + git config user.name "GitHub Action" + git config user.email "action@github.com" + git tag "v${VERSION}" + git push origin "v${VERSION}" + env: + VERSION: ${{ env.VERSION }} + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + tag_name: v${{ env.VERSION }} + name: ${{ env.VERSION }} + draft: false + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 213f6e9f6db01bbc3383b98ecf1033a575bc7596 Mon Sep 17 00:00:00 2001 From: defnotken Date: Tue, 26 Aug 2025 11:21:41 -0500 Subject: [PATCH 02/17] Testing another action --- .github/workflows/lightless-tag-and-release.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lightless-tag-and-release.yml b/.github/workflows/lightless-tag-and-release.yml index 8acca0e..84aefe2 100644 --- a/.github/workflows/lightless-tag-and-release.yml +++ b/.github/workflows/lightless-tag-and-release.yml @@ -16,24 +16,25 @@ jobs: - name: get version from lightless proj id: get_version - run: | - VERSION=$(xmllint --xpath "string(//Version)" LightlessSync/LightlessSync.csproj) - echo "VERSION=$VERSION" >> $GITHUB_ENV + uses: KageKirin/get-csproj-version@v0 + with: + file: /Lightless/Lightless.csproj + - name: Create Git tag run: | git config user.name "GitHub Action" git config user.email "action@github.com" - git tag "v${VERSION}" - git push origin "v${VERSION}" + git tag ${{ steps.test.get_version.version }} + git push origin "${VERSION}" env: VERSION: ${{ env.VERSION }} - name: Create GitHub Release uses: softprops/action-gh-release@v2 with: - tag_name: v${{ env.VERSION }} - name: ${{ env.VERSION }} + tag_name: ${{ steps.test.get_version.version }} + name: Release ${{ steps.test.get_version.version }} draft: false prerelease: false env: From a401a18c046e63e8951725d794d6dc815f1094ae Mon Sep 17 00:00:00 2001 From: defnotken Date: Tue, 26 Aug 2025 11:22:55 -0500 Subject: [PATCH 03/17] renaming variable oops --- .github/workflows/lightless-tag-and-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lightless-tag-and-release.yml b/.github/workflows/lightless-tag-and-release.yml index 84aefe2..d750682 100644 --- a/.github/workflows/lightless-tag-and-release.yml +++ b/.github/workflows/lightless-tag-and-release.yml @@ -18,7 +18,7 @@ jobs: id: get_version uses: KageKirin/get-csproj-version@v0 with: - file: /Lightless/Lightless.csproj + file: /LightlessSync/LightlessSync.csproj - name: Create Git tag From 53bea001ba496b0cb33c3aa3b9bd311ef4834b9f Mon Sep 17 00:00:00 2001 From: defnotken Date: Tue, 26 Aug 2025 11:24:49 -0500 Subject: [PATCH 04/17] slash? --- .github/workflows/lightless-tag-and-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lightless-tag-and-release.yml b/.github/workflows/lightless-tag-and-release.yml index d750682..203beda 100644 --- a/.github/workflows/lightless-tag-and-release.yml +++ b/.github/workflows/lightless-tag-and-release.yml @@ -18,7 +18,7 @@ jobs: id: get_version uses: KageKirin/get-csproj-version@v0 with: - file: /LightlessSync/LightlessSync.csproj + file: LightlessSync/LightlessSync.csproj - name: Create Git tag From 5559c06d2b9c0a588f1b89020084f2f474b83e4a Mon Sep 17 00:00:00 2001 From: defnotken Date: Tue, 26 Aug 2025 11:27:46 -0500 Subject: [PATCH 05/17] version references --- .github/workflows/lightless-tag-and-release.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/lightless-tag-and-release.yml b/.github/workflows/lightless-tag-and-release.yml index 203beda..7adcbac 100644 --- a/.github/workflows/lightless-tag-and-release.yml +++ b/.github/workflows/lightless-tag-and-release.yml @@ -26,9 +26,7 @@ jobs: git config user.name "GitHub Action" git config user.email "action@github.com" git tag ${{ steps.test.get_version.version }} - git push origin "${VERSION}" - env: - VERSION: ${{ env.VERSION }} + git push origin ${{ steps.test.get_version.version }} - name: Create GitHub Release uses: softprops/action-gh-release@v2 From e5c87e5d68fd929af070acf3bb0b8a37b620b287 Mon Sep 17 00:00:00 2001 From: defnotken Date: Tue, 26 Aug 2025 11:30:34 -0500 Subject: [PATCH 06/17] debugging version --- .github/workflows/lightless-tag-and-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lightless-tag-and-release.yml b/.github/workflows/lightless-tag-and-release.yml index 7adcbac..27388bf 100644 --- a/.github/workflows/lightless-tag-and-release.yml +++ b/.github/workflows/lightless-tag-and-release.yml @@ -23,6 +23,7 @@ jobs: - name: Create Git tag run: | + echo "Tagging version ${{ steps.test.get_version.version }}" git config user.name "GitHub Action" git config user.email "action@github.com" git tag ${{ steps.test.get_version.version }} From d5d89a759e674b3bccb1a2bee5d0021d0db1a86e Mon Sep 17 00:00:00 2001 From: defnotken Date: Tue, 26 Aug 2025 12:59:23 -0500 Subject: [PATCH 07/17] testing builds --- .../workflows/lightless-tag-and-release.yml | 67 +++++++++++++------ 1 file changed, 45 insertions(+), 22 deletions(-) diff --git a/.github/workflows/lightless-tag-and-release.yml b/.github/workflows/lightless-tag-and-release.yml index 27388bf..4c27cff 100644 --- a/.github/workflows/lightless-tag-and-release.yml +++ b/.github/workflows/lightless-tag-and-release.yml @@ -4,37 +4,60 @@ on: push: branches: [ master ] +env: + DOTNET_VERSION: 9.x + SOLUTION_PATH: LightlessSync.sln + jobs: tag-and-release: runs-on: ubuntu-latest steps: - - name: checkout lightless + - name: Checkout Lightless uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: get version from lightless proj - id: get_version + - name: Setup .NET 9 SDK + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 9.x + cache: true + + - name: Echo .NET Version + run: dotnet --version + + - name: Install dependencies + run: dotnet restore + + - name: Build LightlessSync + run: dotnet build --configuration Release --no-restore + + - name: Publish LightlessSync + run: dotnet publish --configuration Release --no-build --output publish_output + + - name: Get version + id: package_version uses: KageKirin/get-csproj-version@v0 with: file: LightlessSync/LightlessSync.csproj - - - name: Create Git tag - run: | - echo "Tagging version ${{ steps.test.get_version.version }}" - git config user.name "GitHub Action" - git config user.email "action@github.com" - git tag ${{ steps.test.get_version.version }} - git push origin ${{ steps.test.get_version.version }} + - name: Display version + run: | + echo "Version: ${{ steps.package_version.outputs.version }}" - - name: Create GitHub Release - uses: softprops/action-gh-release@v2 - with: - tag_name: ${{ steps.test.get_version.version }} - name: Release ${{ steps.test.get_version.version }} - draft: false - prerelease: false - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + # - name: Create Git tag + # run: | + # echo "Tagging version ${{ steps.get_version.version }}" + # git config user.name "GitHub Action" + # git config user.email "action@github.com" + # git tag ${{ steps.test.get_version.version }} + # git push origin ${{ steps.test.get_version.version }} + + # - name: Create GitHub Release + # uses: softprops/action-gh-release@v2 + # with: + # tag_name: ${{ steps.test.get_version.version }} + # name: Release ${{ steps.test.get_version.version }} + # draft: false + # prerelease: false + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 97e964473b6845e5e1c7d5b60fa377cbc6d491c3 Mon Sep 17 00:00:00 2001 From: defnotken Date: Tue, 26 Aug 2025 13:01:50 -0500 Subject: [PATCH 08/17] remove cache mode --- .github/workflows/lightless-tag-and-release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/lightless-tag-and-release.yml b/.github/workflows/lightless-tag-and-release.yml index 4c27cff..ea9bda9 100644 --- a/.github/workflows/lightless-tag-and-release.yml +++ b/.github/workflows/lightless-tag-and-release.yml @@ -20,7 +20,6 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: 9.x - cache: true - name: Echo .NET Version run: dotnet --version From 77f667ccfdc0fcc52735e8ff7e8d716ed0e09694 Mon Sep 17 00:00:00 2001 From: defnotken Date: Tue, 26 Aug 2025 13:07:45 -0500 Subject: [PATCH 09/17] now with submodules --- .github/workflows/lightless-tag-and-release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/lightless-tag-and-release.yml b/.github/workflows/lightless-tag-and-release.yml index ea9bda9..e38a8c5 100644 --- a/.github/workflows/lightless-tag-and-release.yml +++ b/.github/workflows/lightless-tag-and-release.yml @@ -15,6 +15,9 @@ jobs: steps: - name: Checkout Lightless uses: actions/checkout@v4 + with: + fetch-depth: 0 + submodules: true - name: Setup .NET 9 SDK uses: actions/setup-dotnet@v4 From 71e80f5c482bc1ba34359e5fdd74f97439cd28bd Mon Sep 17 00:00:00 2001 From: defnotken Date: Tue, 26 Aug 2025 13:29:23 -0500 Subject: [PATCH 10/17] add dalamud --- .github/workflows/lightless-tag-and-release.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lightless-tag-and-release.yml b/.github/workflows/lightless-tag-and-release.yml index e38a8c5..5fda9b4 100644 --- a/.github/workflows/lightless-tag-and-release.yml +++ b/.github/workflows/lightless-tag-and-release.yml @@ -5,6 +5,7 @@ on: branches: [ master ] env: + PLUGIN_NAME: LightlessSync DOTNET_VERSION: 9.x SOLUTION_PATH: LightlessSync.sln @@ -24,8 +25,10 @@ jobs: with: dotnet-version: 9.x - - name: Echo .NET Version - run: dotnet --version + - name: Download Dalamud + run: | + Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -OutFile latest.zip + Expand-Archive -Force latest.zip "$env:AppData\XIVLauncher\addon\Hooks\dev" - name: Install dependencies run: dotnet restore From 4f3a6a820566302f2fe07139255d280cc515748f Mon Sep 17 00:00:00 2001 From: defnotken Date: Tue, 26 Aug 2025 13:31:13 -0500 Subject: [PATCH 11/17] running on windows --- .github/workflows/lightless-tag-and-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lightless-tag-and-release.yml b/.github/workflows/lightless-tag-and-release.yml index 5fda9b4..9e3097a 100644 --- a/.github/workflows/lightless-tag-and-release.yml +++ b/.github/workflows/lightless-tag-and-release.yml @@ -11,7 +11,7 @@ env: jobs: tag-and-release: - runs-on: ubuntu-latest + runs-on: windows-2022 steps: - name: Checkout Lightless From ad74729c4abf923988a2fec9abed01401b5e9cc8 Mon Sep 17 00:00:00 2001 From: defnotken Date: Tue, 26 Aug 2025 13:43:38 -0500 Subject: [PATCH 12/17] Testing zip and publish --- .../workflows/lightless-tag-and-release.yml | 45 ++++++++++++------- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/.github/workflows/lightless-tag-and-release.yml b/.github/workflows/lightless-tag-and-release.yml index 9e3097a..d1a7094 100644 --- a/.github/workflows/lightless-tag-and-release.yml +++ b/.github/workflows/lightless-tag-and-release.yml @@ -49,20 +49,33 @@ jobs: run: | echo "Version: ${{ steps.package_version.outputs.version }}" - # - name: Create Git tag - # run: | - # echo "Tagging version ${{ steps.get_version.version }}" - # git config user.name "GitHub Action" - # git config user.email "action@github.com" - # git tag ${{ steps.test.get_version.version }} - # git push origin ${{ steps.test.get_version.version }} + - name: Create Git tag if not exists + shell: pwsh + run: | + $tag = "${{ steps.package_version.outputs.version }}" + git fetch --tags + if (-not (git tag -l $tag)) { + Write-Host "Tag $tag does not exist. Creating and pushing..." + git config user.name "GitHub Action" + git config user.email "action@github.com" + git tag $tag + git push origin $tag + } else { + Write-Host "Tag $tag already exists. Skipping tag creation." + } - # - name: Create GitHub Release - # uses: softprops/action-gh-release@v2 - # with: - # tag_name: ${{ steps.test.get_version.version }} - # name: Release ${{ steps.test.get_version.version }} - # draft: false - # prerelease: false - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + - name: Zip publish_output + shell: pwsh + run: | + Compress-Archive -Path publish_output\* -DestinationPath LightlessSync.zip + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ steps.package_version.outputs.version }} + name: Release ${{ steps.package_version.outputs.version }} + draft: false + prerelease: false + files: LightlessSync.zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 2b67f44788bcffde5d88a6ec4cca097a99e829ce Mon Sep 17 00:00:00 2001 From: defnotken Date: Wed, 27 Aug 2025 08:56:29 -0500 Subject: [PATCH 13/17] Switching path of the build --- .github/workflows/lightless-tag-and-release.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/lightless-tag-and-release.yml b/.github/workflows/lightless-tag-and-release.yml index d1a7094..9180b99 100644 --- a/.github/workflows/lightless-tag-and-release.yml +++ b/.github/workflows/lightless-tag-and-release.yml @@ -7,7 +7,6 @@ on: env: PLUGIN_NAME: LightlessSync DOTNET_VERSION: 9.x - SOLUTION_PATH: LightlessSync.sln jobs: tag-and-release: @@ -37,7 +36,7 @@ jobs: run: dotnet build --configuration Release --no-restore - name: Publish LightlessSync - run: dotnet publish --configuration Release --no-build --output publish_output + run: dotnet publish --configuration Release --no-build - name: Get version id: package_version @@ -49,6 +48,10 @@ jobs: run: | echo "Version: ${{ steps.package_version.outputs.version }}" + - name: Prepare Lightless Client + run: | + Compress-Archive -Path ${{ env.PLUGIN_NAME }}/bin/x64/Release/* -DestinationPath output/LightlessClient.zip + - name: Create Git tag if not exists shell: pwsh run: | @@ -64,11 +67,6 @@ jobs: Write-Host "Tag $tag already exists. Skipping tag creation." } - - name: Zip publish_output - shell: pwsh - run: | - Compress-Archive -Path publish_output\* -DestinationPath LightlessSync.zip - - name: Create GitHub Release uses: softprops/action-gh-release@v2 with: @@ -76,6 +74,6 @@ jobs: name: Release ${{ steps.package_version.outputs.version }} draft: false prerelease: false - files: LightlessSync.zip + files: LightlessClient.zip env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From ae6013adf6800d8360ef322cffb5b5e1ad6867ac Mon Sep 17 00:00:00 2001 From: defnotken Date: Wed, 27 Aug 2025 08:59:36 -0500 Subject: [PATCH 14/17] Forgot to make a directory --- .github/workflows/lightless-tag-and-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lightless-tag-and-release.yml b/.github/workflows/lightless-tag-and-release.yml index 9180b99..eb3db1a 100644 --- a/.github/workflows/lightless-tag-and-release.yml +++ b/.github/workflows/lightless-tag-and-release.yml @@ -50,6 +50,7 @@ jobs: - name: Prepare Lightless Client run: | + mkdir output Compress-Archive -Path ${{ env.PLUGIN_NAME }}/bin/x64/Release/* -DestinationPath output/LightlessClient.zip - name: Create Git tag if not exists From 9f8cc48e349ee1044d4bf14b14a1c2cad0646d19 Mon Sep 17 00:00:00 2001 From: defnotken Date: Wed, 27 Aug 2025 09:03:55 -0500 Subject: [PATCH 15/17] One more time! --- .github/workflows/lightless-tag-and-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lightless-tag-and-release.yml b/.github/workflows/lightless-tag-and-release.yml index eb3db1a..43ec99a 100644 --- a/.github/workflows/lightless-tag-and-release.yml +++ b/.github/workflows/lightless-tag-and-release.yml @@ -75,6 +75,6 @@ jobs: name: Release ${{ steps.package_version.outputs.version }} draft: false prerelease: false - files: LightlessClient.zip + files: output/LightlessClient.zip env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From b6b8e7bddf2ca6568332c89bd553aacad665d333 Mon Sep 17 00:00:00 2001 From: defnotken Date: Wed, 27 Aug 2025 09:09:03 -0500 Subject: [PATCH 16/17] Clean up --- .../workflows/lightless-tag-and-release.yml | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/lightless-tag-and-release.yml b/.github/workflows/lightless-tag-and-release.yml index 43ec99a..1a82875 100644 --- a/.github/workflows/lightless-tag-and-release.yml +++ b/.github/workflows/lightless-tag-and-release.yml @@ -29,15 +29,12 @@ jobs: Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -OutFile latest.zip Expand-Archive -Force latest.zip "$env:AppData\XIVLauncher\addon\Hooks\dev" - - name: Install dependencies - run: dotnet restore + - name: Lets Build Lightless! + run: | + dotnet restore + dotnet build --configuration Release --no-restore + dotnet publish --configuration Release --no-build - - name: Build LightlessSync - run: dotnet build --configuration Release --no-restore - - - name: Publish LightlessSync - run: dotnet publish --configuration Release --no-build - - name: Get version id: package_version uses: KageKirin/get-csproj-version@v0 @@ -50,6 +47,13 @@ jobs: - name: Prepare Lightless Client run: | + $publishPath = "${{ env.PLUGIN_NAME }}/bin/x64/Release/publish" # Clean up this folder if it exists + if (Test-Path $publishPath) { + Remove-Item -Recurse -Force $publishPath + Write-Host "Removed $publishPath" + } else { + Write-Host "$publishPath does not exist, nothing to remove." + } mkdir output Compress-Archive -Path ${{ env.PLUGIN_NAME }}/bin/x64/Release/* -DestinationPath output/LightlessClient.zip From 2b98bf6891ac6c622b802ac7dcfe9bd2cc53aae2 Mon Sep 17 00:00:00 2001 From: defnotken Date: Wed, 27 Aug 2025 09:13:01 -0500 Subject: [PATCH 17/17] changing the name of the release --- .github/workflows/lightless-tag-and-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lightless-tag-and-release.yml b/.github/workflows/lightless-tag-and-release.yml index 1a82875..ba69c29 100644 --- a/.github/workflows/lightless-tag-and-release.yml +++ b/.github/workflows/lightless-tag-and-release.yml @@ -76,7 +76,7 @@ jobs: uses: softprops/action-gh-release@v2 with: tag_name: ${{ steps.package_version.outputs.version }} - name: Release ${{ steps.package_version.outputs.version }} + name: ${{ steps.package_version.outputs.version }} draft: false prerelease: false files: output/LightlessClient.zip