diff --git a/.gitea/workflows/build-iso.yaml b/.gitea/workflows/build-iso.yaml index 8b0cebd..665b357 100644 --- a/.gitea/workflows/build-iso.yaml +++ b/.gitea/workflows/build-iso.yaml @@ -51,11 +51,19 @@ jobs: TOKEN="${{ secrets.GITEA_TOKEN }}" fi ISO_NAME=$(basename "$ISO_FILE") - echo "Publishing $ISO_NAME to Gitea Packages..." + echo "Publishing $ISO_NAME and naxos-installer-x86_64-linux.iso to Gitea Packages..." + curl -s -X PUT \ + -H "Authorization: token ${TOKEN}" \ + --upload-file "$ISO_FILE" \ + "${{ github.server_url }}/api/packages/naxos/generic/naxos-installer-iso/1.0.0/naxos-installer-x86_64-linux.iso" || true curl -s -X PUT \ -H "Authorization: token ${TOKEN}" \ --upload-file "$ISO_FILE" \ "${{ github.server_url }}/api/packages/naxos/generic/naxos-installer-iso/1.0.0/$ISO_NAME" || true + curl -s -X PUT \ + -H "Authorization: token ${TOKEN}" \ + --upload-file "$ISO_FILE" \ + "${{ github.server_url }}/api/packages/naxos/generic/naxos-installer/latest/naxos-installer-x86_64-linux.iso" || true curl -s -X PUT \ -H "Authorization: token ${TOKEN}" \ --upload-file "$ISO_FILE" \ diff --git a/.gitea/workflows/test-modules.yaml b/.gitea/workflows/test-modules.yaml index cfd6c37..f531f9d 100644 --- a/.gitea/workflows/test-modules.yaml +++ b/.gitea/workflows/test-modules.yaml @@ -67,7 +67,20 @@ jobs: fi ISO_NAME=$(basename "$ISO_FILE") - echo "Publishing $ISO_NAME to Gitea Packages..." + echo "Publishing $ISO_NAME and naxos-installer-x86_64-linux.iso to Gitea Packages..." + + # Publish canonical ISO name requested by users + curl -s -X PUT \ + -H "Authorization: token ${TOKEN}" \ + --upload-file "$ISO_FILE" \ + "${{ github.server_url }}/api/packages/naxos/generic/naxos-installer-iso/1.0.0/naxos-installer-x86_64-linux.iso" || echo "Canonical ISO already exists" + + curl -s -X PUT \ + -H "Authorization: token ${TOKEN}" \ + --upload-file "$ISO_FILE.sha256" \ + "${{ github.server_url }}/api/packages/naxos/generic/naxos-installer-iso/1.0.0/naxos-installer-x86_64-linux.iso.sha256" || echo "Canonical Checksum already exists" + + # Publish versioned Nix-generated filename curl -s -X PUT \ -H "Authorization: token ${TOKEN}" \ --upload-file "$ISO_FILE" \ @@ -77,3 +90,20 @@ jobs: -H "Authorization: token ${TOKEN}" \ --upload-file "$ISO_FILE.sha256" \ "${{ github.server_url }}/api/packages/naxos/generic/naxos-installer-iso/1.0.0/$ISO_NAME.sha256" || echo "Checksum already exists" + + # Publish latest channel + curl -s -X PUT \ + -H "Authorization: token ${TOKEN}" \ + --upload-file "$ISO_FILE" \ + "${{ github.server_url }}/api/packages/naxos/generic/naxos-installer/latest/naxos-installer-x86_64-linux.iso" || true + + # Attach asset to Gitea release v1.0.0 if present + RELEASE_ID=$(curl -s -H "Authorization: token ${TOKEN}" "${{ github.server_url }}/api/v1/repos/naxos/naxos-os/releases/tags/v1.0.0" | jq -r '.id // empty') + if [ -n "$RELEASE_ID" ]; then + echo "Attaching ISO to Gitea Release v1.0.0 (ID: $RELEASE_ID)..." + curl -s -X POST \ + -H "Authorization: token ${TOKEN}" \ + -H "Content-Type: multipart/form-data" \ + -F "attachment=@$ISO_FILE;filename=naxos-installer-x86_64-linux.iso" \ + "${{ github.server_url }}/api/v1/repos/naxos/naxos-os/releases/$RELEASE_ID/assets?name=naxos-installer-x86_64-linux.iso" || true + fi