revert 7d70117e8c90159479aa4439c3b6cedba242da6d
All checks were successful
Build / build (push) Successful in 1m12s

revert Update .gitea/workflows/build.yml
This commit is contained in:
Jacob Schmidt 2025-07-04 16:10:42 -05:00
parent 7d70117e8c
commit 83b967674b

View File

@ -1,61 +1,54 @@
name: Build & Release name: Build
on: on:
push: push:
branches: [ master ]
tags: tags:
- 'v*' # Only run for version tags - 'v*'
pull_request:
branches: [ master ]
jobs: jobs:
release: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET - name: Setup .NET
uses: actions/setup-dotnet@v3 uses: actions/setup-dotnet@v3
with: with:
dotnet-version: '9.0.x' dotnet-version: '9.0.x'
- name: Build & Package - name: Restore dependencies
run: dotnet restore FireflyClient.sln
- name: Build
run: | run: |
dotnet publish -c Release -o artifacts/release chmod +x build-all.sh
mkdir -p artifacts/packages ./build-all.sh
cd artifacts/release
zip -r ../packages/firefly-${GITHUB_REF#refs/tags/}.zip .
- name: Extract Tag Name - name: Verify artifacts
run: | run: |
TAG_NAME="${GITHUB_REF#refs/tags/}" ls -la artifacts/exe || echo "No exe artifacts found"
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV ls -la artifacts/native || echo "No native artifacts found"
- name: Create Release in Gitea - name: Upload artifacts
run: | if: ${{ !env.ACT }}
RELEASE_DATA=$(curl -s -X POST "${GITEA_URL}/api/v1/repos/${GITEA_REPO}/releases" \ uses: actions/upload-artifact@v3
-H "Authorization: token ${GITEA_TOKEN}" \ with:
-H "Content-Type: application/json" \ name: firefly-artifacts
-d "{ path: |
\"tag_name\": \"${TAG_NAME}\", artifacts/exe
\"name\": \"Release ${TAG_NAME}\", artifacts/native
\"body\": \"Automated release for ${TAG_NAME}\",
\"draft\": false,
\"prerelease\": false
}")
echo "Release created: $RELEASE_DATA" - name: Create Release
RELEASE_ID=$(echo "$RELEASE_DATA" | jq '.id') if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
if [ -z "$RELEASE_ID" ] || [ "$RELEASE_ID" = "null" ]; then with:
echo "Failed to retrieve release ID. Exiting." files: |
exit 1 artifacts/exe/**
fi artifacts/native/**
generate_release_notes: true
curl -X POST "${GITEA_URL}/api/v1/repos/${GITEA_REPO}/releases/${RELEASE_ID}/assets?name=firefly-${TAG_NAME}.zip" \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/zip" \
--data-binary @artifacts/packages/firefly-${TAG_NAME}.zip
env:
GITEA_URL: https://gitea.innovativedevsolutions.org
GITEA_REPO: IDSolutions/fireflyclient
GITEA_TOKEN: ${{ secrets.NET_TOKEN }}