From 487e32d5ac1c4f1087eb9beaff15e7629f3b4e4d Mon Sep 17 00:00:00 2001 From: Chad Curtis Date: Mon, 16 Mar 2026 03:22:57 -0500 Subject: [PATCH] Fix release artifact URL: use - instead of + in tag format The + character in git tags breaks GitLab's artifact download URL. Switch tag format from v2026.03.16+abc1234 to v2026.03.16-abc1234 so the artifact URL works without any encoding workarounds. --- .gitlab-ci.yml | 15 +++++---------- package.json | 2 +- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 12ea9aa6..dd4e835b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,7 +46,7 @@ build-apk: timeout: 15 minutes needs: [] rules: - - if: $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+/ + - if: $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+-/ variables: ANDROID_SDK_ROOT: /opt/android-sdk ANDROID_HOME: /opt/android-sdk @@ -124,12 +124,7 @@ build-apk: - cp android/app/build/outputs/apk/release/app-release.apk "artifacts/Ditto-${CI_COMMIT_TAG}.apk" - ls -lh "artifacts/Ditto-${CI_COMMIT_TAG}.apk" - # Upload to Generic Packages registry for a stable public download URL - # URL: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/ditto/${VERSION_NAME}/Ditto-${CI_COMMIT_TAG}.apk - - | - curl --fail --header "JOB-TOKEN: ${CI_JOB_TOKEN}" \ - --upload-file "artifacts/Ditto-${CI_COMMIT_TAG}.apk" \ - "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/ditto/${VERSION_NAME}/Ditto-${CI_COMMIT_TAG}.apk" + artifacts: paths: - "artifacts/Ditto-${CI_COMMIT_TAG}.apk" @@ -146,7 +141,7 @@ release: needs: - build-apk rules: - - if: $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+/ + - if: $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+-/ script: - echo "Creating release for $CI_COMMIT_TAG" release: @@ -156,7 +151,7 @@ release: assets: links: - name: "Ditto-${CI_COMMIT_TAG}.apk" - url: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/ditto/${CI_COMMIT_TAG#v}/Ditto-${CI_COMMIT_TAG}.apk" + url: "${CI_PROJECT_URL}/-/jobs/artifacts/${CI_COMMIT_TAG}/raw/artifacts/Ditto-${CI_COMMIT_TAG}.apk?job=build-apk" link_type: package publish-zapstore: @@ -165,7 +160,7 @@ publish-zapstore: needs: - build-apk rules: - - if: $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+/ + - if: $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+-/ variables: SIGN_WITH: $ZAPSTORE_BUNKER_URL script: diff --git a/package.json b/package.json index 6cbed6d7..fbcaa729 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "build": "npm i --silent && vite build -l error && cp dist/index.html dist/404.html && echo 'Project built successfully!'", "test": "npm i --silent && tsc --noEmit && eslint && vitest run --reporter=dot --silent && vite build -l error && cp dist/index.html dist/404.html && echo 'All tests passed!'", "icons": "bash scripts/generate-icons.sh", - "release": "git tag \"v$(date +%Y.%m.%d)+$(git rev-parse --short HEAD)\" && git push origin --tags" + "release": "git tag \"v$(date +%Y.%m.%d)-$(git rev-parse --short HEAD)\" && git push origin --tags" }, "engines": { "npm": "10.9.4",