MAYBE NOW IT WORKS?
This commit is contained in:
@@ -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"
|
||||
|
Reference in New Issue
Block a user