ci(release): pin upload/download-artifact to v3 for Gitea Actions
CI / cargo fmt --check (push) Successful in 22s
CI / cargo clippy (push) Successful in 19s
CI / cargo test (push) Successful in 31s
Release / build x86_64-unknown-linux-gnu (push) Successful in 1m34s
Release / build aarch64-unknown-linux-musl (push) Successful in 55s
Release / build aarch64-unknown-linux-gnu (push) Failing after 57s
Release / build x86_64-unknown-linux-musl (push) Successful in 1m16s
Release / gitea release (push) Has been skipped
CI / editor keymaps (push) Successful in 1m24s

actions/upload-artifact@v4 and download-artifact@v4 require the
GitHub-hosted artifact backend, which Gitea Actions does not
implement (GHESNotSupportedError on v2.0.0+). Downgrade to v3.

v3's download-artifact has no merge-multiple flag and nests each
artifact under artifacts/<artifact-name>/, so the upload loop now
recurses to find the archives.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-14 22:55:31 +00:00
parent 82ff454e0f
commit f2fd7d6376
+9 -4
View File
@@ -76,7 +76,9 @@ jobs:
echo "archive=$archive" >> "$GITHUB_OUTPUT" echo "archive=$archive" >> "$GITHUB_OUTPUT"
- name: Upload build artifact - name: Upload build artifact
uses: actions/upload-artifact@v4 # Gitea Actions doesn't support upload-artifact v4 (uses a
# GitHub-only backend API); pin to v3.
uses: actions/upload-artifact@v3
with: with:
name: nuwiki-ls-${{ matrix.target }} name: nuwiki-ls-${{ matrix.target }}
path: ${{ steps.package.outputs.archive }} path: ${{ steps.package.outputs.archive }}
@@ -91,10 +93,11 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Download all build artifacts - name: Download all build artifacts
uses: actions/download-artifact@v4 # Paired with upload-artifact@v3 above. v3 has no merge-multiple
# option and nests each artifact under its own subdirectory.
uses: actions/download-artifact@v3
with: with:
path: ./artifacts path: ./artifacts
merge-multiple: true
- name: Ensure jq + curl - name: Ensure jq + curl
run: | run: |
@@ -135,7 +138,9 @@ jobs:
fi fi
echo "Created release id=$release_id" echo "Created release id=$release_id"
for archive in artifacts/*.tar.gz; do # download-artifact@v3 nests each artifact under its own dir
# (artifacts/<artifact-name>/<file>), so recurse.
for archive in $(find artifacts -name '*.tar.gz' -type f); do
name="$(basename "$archive")" name="$(basename "$archive")"
echo "Uploading $name …" echo "Uploading $name …"
curl --fail --silent --show-error \ curl --fail --silent --show-error \