From a6941102a45a12562f035c06b6dc17826fe34739 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 24 Apr 2025 07:06:20 -0600 Subject: [PATCH 1/8] testing upload and release --- .gitlab-ci.yml | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bd0d5af..d029b17 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,11 @@ stages: - test - build + - upload + - release + +variables: + PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/nyxi-installer/${CI_COMMIT_TAG}" test: stage: test @@ -18,8 +23,27 @@ build: - apt update -m - apt install -y libfdisk-dev libclang-19-dev script: - - cargo build --release --verbose + - cargo build --release + - mkdir bin + - mv /builds/ahoneybun/nyxi-installer/target/release/nyxi-installer /bin/nyxi-installer - chmod +x /builds/ahoneybun/nyxi-installer/target/release/nyxi-installer + cache: + paths: + - target/release/ artifacts: - paths: - - /builds/ahoneybun/nyxi-installer/target/release/nyxi-installer + paths: + - bin + +upload: + stage: upload + image: curlimages/curl:latest + rules: + - if: $CI_COMMIT_TAG + script: + - 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file bin/nyxi-installer ${PACKAGE_REGISTRY_URL}/nyxi-installer' + +release: + stage: release + image: registry.gitlab.com/gitlab-org/release-cli:latest + script: + - 'release-cli create --name "nyxi-installer" --assets-link "{\"name\":\"nyxi-installer\", \"url\":\"${PACKAGE_REGISTRY_URL}/nyxi-installer\"}"' From 1a0de19932150827ada66b847bc1cfe5a2659dd5 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 24 Apr 2025 07:11:43 -0600 Subject: [PATCH 2/8] fix chmod --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d029b17..5b8e510 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,7 +26,7 @@ build: - cargo build --release - mkdir bin - mv /builds/ahoneybun/nyxi-installer/target/release/nyxi-installer /bin/nyxi-installer - - chmod +x /builds/ahoneybun/nyxi-installer/target/release/nyxi-installer + - chmod +x /bin/nyxi-installer cache: paths: - target/release/ From e6475f738caa89654477f8ef81dce47687b04712 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 24 Apr 2025 07:19:09 -0600 Subject: [PATCH 3/8] add missing tag-name --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5b8e510..1b9ed98 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,4 +46,4 @@ release: stage: release image: registry.gitlab.com/gitlab-org/release-cli:latest script: - - 'release-cli create --name "nyxi-installer" --assets-link "{\"name\":\"nyxi-installer\", \"url\":\"${PACKAGE_REGISTRY_URL}/nyxi-installer\"}"' + - 'release-cli create --name "nyxi-installer" --tag-name "v${MAJOR}.${MINOR}.${REVISION}" --assets-link "{\"name\":\"nyxi-installer\", \"url\":\"${PACKAGE_REGISTRY_URL}/nyxi-installer\"}"' From 55d0ea77d9dbe1a34b7c8a1f129d89b1fe1549e2 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 24 Apr 2025 07:25:19 -0600 Subject: [PATCH 4/8] fix tag-name --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1b9ed98..caa1849 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,4 +46,4 @@ release: stage: release image: registry.gitlab.com/gitlab-org/release-cli:latest script: - - 'release-cli create --name "nyxi-installer" --tag-name "v${MAJOR}.${MINOR}.${REVISION}" --assets-link "{\"name\":\"nyxi-installer\", \"url\":\"${PACKAGE_REGISTRY_URL}/nyxi-installer\"}"' + - 'release-cli create --name "nyxi-installer" --tag-name $CI_COMMIT_TAG --assets-link "{\"name\":\"nyxi-installer\", \"url\":\"${PACKAGE_REGISTRY_URL}/nyxi-installer\"}"' From 45cedd2dc1677515239f12d0b71689f7c996b6b5 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 24 Apr 2025 07:34:08 -0600 Subject: [PATCH 5/8] fix tag-name --- .gitlab-ci.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index caa1849..1de163c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,22 +28,22 @@ build: - mv /builds/ahoneybun/nyxi-installer/target/release/nyxi-installer /bin/nyxi-installer - chmod +x /bin/nyxi-installer cache: - paths: - - target/release/ + paths: + - target/release/ artifacts: - paths: - - bin + paths: + - bin upload: - stage: upload - image: curlimages/curl:latest - rules: - - if: $CI_COMMIT_TAG - script: - - 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file bin/nyxi-installer ${PACKAGE_REGISTRY_URL}/nyxi-installer' + stage: upload + image: curlimages/curl:latest + rules: + - if: $CI_COMMIT_TAG + script: + - 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file bin/nyxi-installer ${PACKAGE_REGISTRY_URL}/nyxi-installer' release: stage: release image: registry.gitlab.com/gitlab-org/release-cli:latest script: - - 'release-cli create --name "nyxi-installer" --tag-name $CI_COMMIT_TAG --assets-link "{\"name\":\"nyxi-installer\", \"url\":\"${PACKAGE_REGISTRY_URL}/nyxi-installer\"}"' + - release-cli create --name "nyxi-installer" --tag-name $CI_COMMIT_TAG --assets-link "{\"name\":\"nyxi-installer\", \"url\":\"${PACKAGE_REGISTRY_URL}/nyxi-installer\"}" From 129ef355c89c5599a7bf30f7898f13f7f72fa795 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 24 Apr 2025 07:39:38 -0600 Subject: [PATCH 6/8] fix tag-name --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1de163c..3e75378 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,4 +46,4 @@ release: stage: release image: registry.gitlab.com/gitlab-org/release-cli:latest script: - - release-cli create --name "nyxi-installer" --tag-name $CI_COMMIT_TAG --assets-link "{\"name\":\"nyxi-installer\", \"url\":\"${PACKAGE_REGISTRY_URL}/nyxi-installer\"}" + - release-cli create --name "nyxi-installer" --tag-name "the crab strikes" --assets-link "{\"name\":\"nyxi-installer\", \"url\":\"${PACKAGE_REGISTRY_URL}/nyxi-installer\"}" From 462939f70b74eea2f9a433e6cb78f08215fa64a8 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 24 Apr 2025 07:46:42 -0600 Subject: [PATCH 7/8] fix tag-name --- .gitlab-ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3e75378..6b3936d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,5 +45,8 @@ upload: release: stage: release image: registry.gitlab.com/gitlab-org/release-cli:latest - script: - - release-cli create --name "nyxi-installer" --tag-name "the crab strikes" --assets-link "{\"name\":\"nyxi-installer\", \"url\":\"${PACKAGE_REGISTRY_URL}/nyxi-installer\"}" + rules: + - if: $CI_COMMIT_TAG + release: + tag_name: '$CI_COMMIT_TAG' + description: '$CI_COMMIT_TAG' From dfaba208d83c304517a27c50a43cc38211ff58f0 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 24 Apr 2025 07:48:11 -0600 Subject: [PATCH 8/8] add script for release --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6b3936d..e6935a2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,6 +47,8 @@ release: image: registry.gitlab.com/gitlab-org/release-cli:latest rules: - if: $CI_COMMIT_TAG + script: + - echo "running release_job" release: tag_name: '$CI_COMMIT_TAG' description: '$CI_COMMIT_TAG'