From 0aa79b75306e8449b104cea9f66ebeaae88811b9 Mon Sep 17 00:00:00 2001 From: tajniak81 <13187254+tajniak81@users.noreply.github.com> Date: Tue, 3 Nov 2026 11:37:40 +0100 Subject: [PATCH] Use artifact actions that run on Gitea Version 4 of upload-artifact and download-artifact stops on any server other than github.com, so the release moves the desktop installers between jobs with v3, which Gitea supports. v3 downloads every artifact into its own folder, so the release step attaches dist/*/*. The docs workflow only uploads and deploys on GitHub, where Pages exists; on Gitea it checks that the site builds. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/docs.yml | 3 +++ .github/workflows/release.yml | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0fe96e2..a9167f8 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -35,12 +35,15 @@ jobs: # Project sites live under //. DOCS_BASE: /${{ github.event.repository.name }}/ run: npm run build:docs + # Pages exists only on GitHub; elsewhere this workflow checks the build. - uses: actions/upload-pages-artifact@v3 + if: github.server_url == 'https://github.com' with: path: Docs-Site/.vitepress/dist deploy: needs: build + if: github.server_url == 'https://github.com' runs-on: ubuntu-latest environment: name: github-pages diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3bcf15e..7fb0586 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -202,7 +202,8 @@ jobs: fi wails3 task ${{ matrix.task }} EXTRA_LDFLAGS="$flags" - - uses: actions/upload-artifact@v4 + # v3: v4 of the artifact actions refuses to run outside github.com. + - uses: actions/upload-artifact@v3 with: name: desktop-${{ matrix.os }} path: ${{ matrix.files }} @@ -212,11 +213,10 @@ jobs: if: github.event_name == 'push' runs-on: ubuntu-latest steps: - - uses: actions/download-artifact@v4 + # Each artifact lands in dist//. + - uses: actions/download-artifact@v3 with: - pattern: desktop-* path: dist - merge-multiple: true # Gitea's release API; a release made earlier for this tag (by hand or # by a rerun) gets the files added instead of a second release. @@ -235,7 +235,7 @@ jobs: '{tag_name: $tag, name: $tag, prerelease: $pre}' | curl -fsS -X POST -H "$auth" -H "Content-Type: application/json" -d @- "$API/releases" | jq -r .id) fi - for f in dist/*; do + for f in dist/*/*; do name=$(basename "$f") echo "Attaching $name" curl -fsS -X POST -H "$auth" -F "attachment=@$f" "$API/releases/$id/assets?name=$name" > /dev/null