fix: remove GitHub Actions workflow and handle existing release assets
The GitHub Actions fallback workflow raced with the Gitea CI — it ran first and created the GitHub release with its own tarball (different checksum), causing the Gitea CI's upload to fail and leaving a checksum mismatch on Artifact Hub. - Remove .github/workflows/release.yml entirely (Gitea CI handles both Gitea and GitHub releases) - Fix the Gitea CI's GitHub release step to delete existing assets before uploading, so re-runs and race conditions are handled gracefully Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,56 +0,0 @@
|
||||
name: GitHub Release (fallback)
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check if release already exists
|
||||
id: check
|
||||
run: |
|
||||
if gh release view "${{ github.ref_name }}" --repo "${{ github.repository }}" &>/dev/null; then
|
||||
echo "Release ${{ github.ref_name }} already exists (created by Gitea CI), skipping."
|
||||
echo "exists=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "No existing release found, building as fallback."
|
||||
echo "exists=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Checkout
|
||||
if: steps.check.outputs.exists == 'false'
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
if: steps.check.outputs.exists == 'false'
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.check.outputs.exists == 'false'
|
||||
run: npm ci
|
||||
|
||||
- name: Build plugin
|
||||
if: steps.check.outputs.exists == 'false'
|
||||
run: npx @kinvolk/headlamp-plugin build
|
||||
|
||||
- name: Package tarball
|
||||
if: steps.check.outputs.exists == 'false'
|
||||
run: npx @kinvolk/headlamp-plugin package
|
||||
|
||||
- name: Create GitHub Release
|
||||
if: steps.check.outputs.exists == 'false'
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: "*.tar.gz"
|
||||
generate_release_notes: true
|
||||
Reference in New Issue
Block a user