From 2be5f5d3207d9e620a5b99379465b12f5c6cffa7 Mon Sep 17 00:00:00 2001 From: Professor Fartsalot Date: Sun, 31 Aug 2025 02:19:45 -0400 Subject: [PATCH] MAYBE NOW IT WORKS? --- .gitea/workflows/build.yml | 40 ++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 8aef1cf..4af1591 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -1,4 +1,4 @@ -name: .NET Build +name: .NET Build and Publish to Gitea on: push: @@ -13,7 +13,11 @@ jobs: uses: actions/checkout@v4 with: submodules: true - - name: Restore .NET dependencies + + - name: Verify .NET installation + run: dotnet --version + + - name: Restore dependencies run: dotnet restore - name: Download Dalamud @@ -25,13 +29,33 @@ jobs: - name: Build project run: dotnet build --no-restore --configuration Release --nologo - - name: Publish Windows executable - run: dotnet publish -c Release -r win-x64 --self-contained true -o ./publish + - name: Publish Windows self-contained executable + run: | + dotnet publish MareSynchronos.csproj \ + -c Release \ + -r win-x64 \ + --self-contained true \ + -o ./publish - name: Archive published files run: zip -r SnowcloakClient.zip ./publish/* - - name: Upload build artifact - uses: actions/upload-artifact@v4 - with: - path: ./publish/* + - name: Create Gitea release + env: + GITEA_TOKEN: ${{ secrets.build_snowcloak_client }} + run: | + API_URL="https://imbuilding.anuke.org/api/v1/repos/owner/repo/releases" + TAG="v$(date +%Y%m%d%H%M)" + # Create release + RELEASE_ID=$(curl -s -X POST \ + -H "Content-Type: application/json" \ + -H "Authorization: token $GITEA_TOKEN" \ + -d "{\"tag_name\":\"$TAG\",\"name\":\"Automated Build $TAG\",\"body\":\"Automated build artifact\"}" \ + $API_URL | jq -r '.id') + echo "Release ID: $RELEASE_ID" + # Upload asset + curl -s -X POST \ + -H "Authorization: token $GITEA_TOKEN" \ + -F "name=SnowcloakClient.zip" \ + -F "attachment=@SnowcloakClient.zip" \ + "$API_URL/$RELEASE_ID/assets"