The workflow was written for github.com: actions/upload-artifact failed on the Gitea runner, softprops/action-gh-release only talks to the GitHub API, and gen-manifest.js hardcoded github.com URLs. - drop the artifact upload (release assets are the deliverable) - upload release assets with tools/release-gitea.js, a dependency-free Gitea API client; re-running a tag replaces the attachments - gen-manifest.js takes --server/PUBLIC_SERVER_URL and knows that Gitea spells the latest-asset URL /releases/download/latest/<file> - PUBLIC_SERVER_URL is set explicitly because the runner only sees the instance's internal LAN address Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
b137bf9eda
commit
bf2daac146
@@ -7,6 +7,11 @@ on:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
# Public URL of this Gitea instance. The runner is handed the instance's
|
||||
# internal address (a LAN IP), which is no good in a manifest the TV fetches.
|
||||
PUBLIC_SERVER_URL: https://git.crylia.de
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -30,28 +35,31 @@ jobs:
|
||||
- name: Generate manifest and repository index
|
||||
run: npm run manifest
|
||||
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: lg-update-blocker
|
||||
path: dist/*
|
||||
- name: Show what was built
|
||||
run: ls -la dist
|
||||
|
||||
# Tag a commit with v<version> (matching package.json) to publish a
|
||||
# release. The repository URL for the Homebrew Channel stays stable:
|
||||
# https://github.com/<owner>/<repo>/releases/latest/download/apps.json
|
||||
# <server>/<owner>/<repo>/releases/download/latest/apps.json
|
||||
- name: Write release notes
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
run: |
|
||||
cat > "${RUNNER_TEMP:-/tmp}/release-notes.md" <<EOF
|
||||
Install through the Homebrew Channel by adding this repository once
|
||||
(Homebrew Channel → Settings → Add repository):
|
||||
|
||||
\`\`\`
|
||||
${PUBLIC_SERVER_URL}/${GITHUB_REPOSITORY}/releases/download/latest/apps.json
|
||||
\`\`\`
|
||||
|
||||
That URL always resolves to the newest release, so future versions
|
||||
show up as updates automatically.
|
||||
|
||||
Or install the \`.ipk\` below manually with \`ares-install <file>.ipk\`.
|
||||
EOF
|
||||
|
||||
- name: Release
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: dist/*
|
||||
generate_release_notes: true
|
||||
body: |
|
||||
Install through the Homebrew Channel by adding this repository once
|
||||
(Homebrew Channel → Settings → Add repository):
|
||||
|
||||
```
|
||||
https://github.com/${{ github.repository }}/releases/latest/download/apps.json
|
||||
```
|
||||
|
||||
Or install the `.ipk` below manually with
|
||||
`ares-install <file>.ipk`.
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: node tools/release-gitea.js --notes-from "${RUNNER_TEMP:-/tmp}/release-notes.md"
|
||||
|
||||
Reference in New Issue
Block a user