CI: macOS-build (universal, cross) en automatische release na groene master
@@ -0,0 +1,7 @@
1
Eerste release vanaf BlueGit (git.timfalken.com/timfa/posprint). Posprint is verhuisd van GitLab; de GitLab-repository is alleen nog een backup.
2
3
Nieuw:
4
* macOS-download: een universele Posprint.app (Apple Silicon en Intel) als zip. Niet ondertekend door Apple: open hem de eerste keer met rechtsklik → Open, of voer `xattr -cr Posprint.app` uit.
5
* Windows-, Debian- en Arch-builds komen nu uit de BlueGit-pipeline.
6
* De AUR-pakketten `posprint` en `posprint-bin` halen hun bronnen nu van BlueGit.
7
* Releases worden automatisch gemaakt na een groene master-pipeline.
@@ -0,0 +1,7 @@1
Eerste release vanaf BlueGit (git.timfalken.com/timfa/posprint). Posprint is verhuisd van GitLab; de GitLab-repository is alleen nog een backup.2
3
Nieuw:4
* macOS-download: een universele Posprint.app (Apple Silicon en Intel) als zip. Niet ondertekend door Apple: open hem de eerste keer met rechtsklik → Open, of voer `xattr -cr Posprint.app` uit.5
* Windows-, Debian- en Arch-builds komen nu uit de BlueGit-pipeline.6
* De AUR-pakketten `posprint` en `posprint-bin` halen hun bronnen nu van BlueGit.7
* Releases worden automatisch gemaakt na een groene master-pipeline.@@ -3,8 +3,12 @@
3
3
#
4
4
# Merge request / any branch push: test.
5
5
# Master: test + all release builds + AUR dry run (nothing is published).
6
# `release` is manual on master: it creates the next tag (highest tag + 1
6
# `release` runs automatically after green builds on master: it creates the next tag (highest tag + 1
7
7
# patch, or Cargo.toml if higher; override with RELEASE_VERSION) through the
8
# BlueGit release API, but only if HEAD is untagged and something outside
9
# docs/CI changed since the last tag (scripts/ci/release.sh); otherwise it
10
# writes `skip` and publish:aur does nothing. Release notes: RELEASE_NOTES.md.
11
#
8
12
# BlueGit release API with the build artifacts as assets. Then publish:aur
9
13
# updates the AUR packages posprint and posprint-bin.
10
14
# Tag pushes never run a pipeline (old tags must not rebuild).
@@ -55,7 +59,12 @@ test:
55
59
- cargo test --verbose
56
60
57
61
version:
58
extends: .master
62
rules:
63
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
64
when: never
65
- if: $CI_COMMIT_BRANCH == "master"
66
- if: $CI_PIPELINE_SOURCE == "web"
67
- if: $CI_PIPELINE_SOURCE == "api"
59
68
stage: test
60
69
image: bluegit/base
61
70
needs: []
@@ -145,6 +154,31 @@ build:windows:
145
154
paths: [dist/posprint.exe]
146
155
expire_in: 30d
147
156
157
# Cross-built on Linux (no macOS runner): universal Posprint.app as zip.
158
# Untested on a real Mac in CI; not notarized.
159
build:macos:
160
stage: build
161
image: ghcr.io/rust-cross/cargo-zigbuild:latest
162
timeout: 2h
163
needs: [version, test]
164
rules:
165
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
166
when: never
167
- if: $CI_COMMIT_BRANCH == "master"
168
# Manual pipeline on a branch: build-check macOS only.
169
- if: $CI_PIPELINE_SOURCE == "web"
170
- if: $CI_PIPELINE_SOURCE == "api"
171
cache:
172
key: cargo-macos
173
paths: [target/, cargo-home/]
174
script:
175
- export CARGO_HOME="$PWD/cargo-home" PATH="$PWD/cargo-home/bin:$PATH"
176
- bash scripts/ci/set-version.sh
177
- bash scripts/ci/build-macos.sh
178
artifacts:
179
paths: [dist/macos-universal.zip]
180
expire_in: 30d
181
148
182
# Safe AUR check on every master pipeline: real SSH key and AUR clone,
149
183
# PKGBUILD/.SRCINFO generation, but AUR_DRY_RUN=1 never pushes.
150
184
aur:dry-run:
@@ -165,11 +199,13 @@ release:
165
199
extends: .master
166
200
stage: release
167
201
image: bluegit/base
168
needs: [version, build:linux-deb, build:linux-arch, build:windows]
169
when: manual
202
needs: [version, build:linux-deb, build:linux-arch, build:windows, build:macos]
170
203
resource_group: release
171
204
script:
172
205
- bash scripts/ci/release.sh
206
artifacts:
207
paths: [artifacts/released.txt]
208
expire_in: 30d
173
209
174
210
publish:aur:
175
211
extends: .master
@@ -181,5 +217,6 @@ publish:aur:
181
217
script:
182
218
- pacman -Syu --noconfirm --needed git openssh curl coreutils shadow util-linux
183
219
- bash scripts/aur-ssh-setup.sh
220
- if [ "$(cat artifacts/released.txt)" = "skip" ]; then echo "No new release in this pipeline; AUR unchanged."; exit 0; fi
184
221
- cp dist/x86_64-bin.tar.gz "dist/posprint-$(cat artifacts/version.txt)-x86_64.tar.gz"
185
222
- bash scripts/publish-aur.sh "$(cat artifacts/version.txt)"
@@ -3,8 +3,12 @@3
#3
#4
# Merge request / any branch push: test.4
# Merge request / any branch push: test.5
# Master: test + all release builds + AUR dry run (nothing is published).5
# Master: test + all release builds + AUR dry run (nothing is published).6
# `release` is manual on master: it creates the next tag (highest tag + 16
# `release` runs automatically after green builds on master: it creates the next tag (highest tag + 17
# patch, or Cargo.toml if higher; override with RELEASE_VERSION) through the7
# patch, or Cargo.toml if higher; override with RELEASE_VERSION) through the8
# BlueGit release API, but only if HEAD is untagged and something outside9
# docs/CI changed since the last tag (scripts/ci/release.sh); otherwise it10
# writes `skip` and publish:aur does nothing. Release notes: RELEASE_NOTES.md.11
#8
# BlueGit release API with the build artifacts as assets. Then publish:aur12
# BlueGit release API with the build artifacts as assets. Then publish:aur9
# updates the AUR packages posprint and posprint-bin.13
# updates the AUR packages posprint and posprint-bin.10
# Tag pushes never run a pipeline (old tags must not rebuild).14
# Tag pushes never run a pipeline (old tags must not rebuild).@@ -55,7 +59,12 @@ test:55
- cargo test --verbose59
- cargo test --verbose56
60
57
version:61
version:58
extends: .master62
rules:63
- if: $CI_PIPELINE_SOURCE == "merge_request_event"64
when: never65
- if: $CI_COMMIT_BRANCH == "master"66
- if: $CI_PIPELINE_SOURCE == "web"67
- if: $CI_PIPELINE_SOURCE == "api"59
stage: test68
stage: test60
image: bluegit/base69
image: bluegit/base61
needs: []70
needs: []@@ -145,6 +154,31 @@ build:windows:145
paths: [dist/posprint.exe]154
paths: [dist/posprint.exe]146
expire_in: 30d155
expire_in: 30d147
156
157
# Cross-built on Linux (no macOS runner): universal Posprint.app as zip.158
# Untested on a real Mac in CI; not notarized.159
build:macos:160
stage: build161
image: ghcr.io/rust-cross/cargo-zigbuild:latest162
timeout: 2h163
needs: [version, test]164
rules:165
- if: $CI_PIPELINE_SOURCE == "merge_request_event"166
when: never167
- if: $CI_COMMIT_BRANCH == "master"168
# Manual pipeline on a branch: build-check macOS only.169
- if: $CI_PIPELINE_SOURCE == "web"170
- if: $CI_PIPELINE_SOURCE == "api"171
cache:172
key: cargo-macos173
paths: [target/, cargo-home/]174
script:175
- export CARGO_HOME="$PWD/cargo-home" PATH="$PWD/cargo-home/bin:$PATH"176
- bash scripts/ci/set-version.sh177
- bash scripts/ci/build-macos.sh178
artifacts:179
paths: [dist/macos-universal.zip]180
expire_in: 30d181
148
# Safe AUR check on every master pipeline: real SSH key and AUR clone,182
# Safe AUR check on every master pipeline: real SSH key and AUR clone,149
# PKGBUILD/.SRCINFO generation, but AUR_DRY_RUN=1 never pushes.183
# PKGBUILD/.SRCINFO generation, but AUR_DRY_RUN=1 never pushes.150
aur:dry-run:184
aur:dry-run:@@ -165,11 +199,13 @@ release:165
extends: .master199
extends: .master166
stage: release200
stage: release167
image: bluegit/base201
image: bluegit/base168
needs: [version, build:linux-deb, build:linux-arch, build:windows]202
needs: [version, build:linux-deb, build:linux-arch, build:windows, build:macos]169
when: manual170
resource_group: release203
resource_group: release171
script:204
script:172
- bash scripts/ci/release.sh205
- bash scripts/ci/release.sh206
artifacts:207
paths: [artifacts/released.txt]208
expire_in: 30d173
209
174
publish:aur:210
publish:aur:175
extends: .master211
extends: .master@@ -181,5 +217,6 @@ publish:aur:181
script:217
script:182
- pacman -Syu --noconfirm --needed git openssh curl coreutils shadow util-linux218
- pacman -Syu --noconfirm --needed git openssh curl coreutils shadow util-linux183
- bash scripts/aur-ssh-setup.sh219
- bash scripts/aur-ssh-setup.sh220
- if [ "$(cat artifacts/released.txt)" = "skip" ]; then echo "No new release in this pipeline; AUR unchanged."; exit 0; fi184
- cp dist/x86_64-bin.tar.gz "dist/posprint-$(cat artifacts/version.txt)-x86_64.tar.gz"221
- cp dist/x86_64-bin.tar.gz "dist/posprint-$(cat artifacts/version.txt)-x86_64.tar.gz"185
- bash scripts/publish-aur.sh "$(cat artifacts/version.txt)"222
- bash scripts/publish-aur.sh "$(cat artifacts/version.txt)"@@ -0,0 +1,31 @@
1
#!/usr/bin/env bash
2
# Cross-build Posprint.app (universal: arm64 + x86_64) on Linux with
3
# cargo-zigbuild and the macOS SDK from the cargo-zigbuild image ($SDKROOT).
4
# Output: dist/macos-universal.zip (Posprint.app). Not notarized; the
5
# binaries carry the linker's ad-hoc signature only.
6
set -euo pipefail
7
cd "$(dirname "$0")/../.."
8
v="$(cat artifacts/version.txt)"
9
: "${SDKROOT:?SDKROOT (macOS SDK) is not set in this image}"
10
apt-get update -qq
11
apt-get install -y -qq zip llvm >/dev/null
12
lipo="$(command -v llvm-lipo || ls /usr/bin/llvm-lipo-* | head -n1)"
13
rustup target add aarch64-apple-darwin x86_64-apple-darwin
14
cargo zigbuild --release --locked --target universal2-apple-darwin
15
bin=target/universal2-apple-darwin/release/posprint
16
test -f "$bin"
17
app=target/macos/Posprint.app
18
rm -rf "$app"; mkdir -p "$app/Contents/MacOS" "$app/Contents/Resources"
19
for a in aarch64 x86_64; do
20
zig cc -target "$a-macos.11.0" -O2 -isysroot "$SDKROOT" \
21
-F"$SDKROOT/System/Library/Frameworks" -L"$SDKROOT/usr/lib" -I"$SDKROOT/usr/include" \
22
-framework Cocoa -o "target/macos/launcher-$a" packaging/macos/launcher.m
23
done
24
"$lipo" -create -output "$app/Contents/MacOS/posprint-launcher" target/macos/launcher-aarch64 target/macos/launcher-x86_64
25
cp "$bin" "$app/Contents/MacOS/posprint-bin"
26
chmod 755 "$app/Contents/MacOS/"*
27
sed "s/@VERSION@/${v}/g" packaging/macos/Info.plist > "$app/Contents/Info.plist"
28
"$lipo" -info "$app/Contents/MacOS/posprint-bin" "$app/Contents/MacOS/posprint-launcher"
29
mkdir -p dist
30
(cd target/macos && rm -f ../../dist/macos-universal.zip && zip -qry ../../dist/macos-universal.zip Posprint.app)
31
ls -l dist/macos-universal.zip
@@ -0,0 +1,31 @@1
#!/usr/bin/env bash2
# Cross-build Posprint.app (universal: arm64 + x86_64) on Linux with3
# cargo-zigbuild and the macOS SDK from the cargo-zigbuild image ($SDKROOT).4
# Output: dist/macos-universal.zip (Posprint.app). Not notarized; the5
# binaries carry the linker's ad-hoc signature only.6
set -euo pipefail7
cd "$(dirname "$0")/../.."8
v="$(cat artifacts/version.txt)"9
: "${SDKROOT:?SDKROOT (macOS SDK) is not set in this image}"10
apt-get update -qq11
apt-get install -y -qq zip llvm >/dev/null12
lipo="$(command -v llvm-lipo || ls /usr/bin/llvm-lipo-* | head -n1)"13
rustup target add aarch64-apple-darwin x86_64-apple-darwin14
cargo zigbuild --release --locked --target universal2-apple-darwin15
bin=target/universal2-apple-darwin/release/posprint16
test -f "$bin"17
app=target/macos/Posprint.app18
rm -rf "$app"; mkdir -p "$app/Contents/MacOS" "$app/Contents/Resources"19
for a in aarch64 x86_64; do20
zig cc -target "$a-macos.11.0" -O2 -isysroot "$SDKROOT" \21
-F"$SDKROOT/System/Library/Frameworks" -L"$SDKROOT/usr/lib" -I"$SDKROOT/usr/include" \22
-framework Cocoa -o "target/macos/launcher-$a" packaging/macos/launcher.m23
done24
"$lipo" -create -output "$app/Contents/MacOS/posprint-launcher" target/macos/launcher-aarch64 target/macos/launcher-x86_6425
cp "$bin" "$app/Contents/MacOS/posprint-bin"26
chmod 755 "$app/Contents/MacOS/"*27
sed "s/@VERSION@/${v}/g" packaging/macos/Info.plist > "$app/Contents/Info.plist"28
"$lipo" -info "$app/Contents/MacOS/posprint-bin" "$app/Contents/MacOS/posprint-launcher"29
mkdir -p dist30
(cd target/macos && rm -f ../../dist/macos-universal.zip && zip -qry ../../dist/macos-universal.zip Posprint.app)31
ls -l dist/macos-universal.zip@@ -5,12 +5,26 @@ set -euo pipefail
5
5
: "${CI_API_URL:?}" "${CI_JOB_TOKEN:?}" "${CI_COMMIT_SHA:?}" "${CI_PROJECT_PATH:?}"
6
6
cd "$(dirname "$0")/../.."
7
7
v="$(cat artifacts/version.txt)"
8
mkdir -p artifacts
9
skip() { echo "No release: $1"; echo skip > artifacts/released.txt; exit 0; }
10
# Never release twice: not when HEAD already carries a tag, and not when only
11
# docs/CI files changed since the last version tag.
12
git fetch -q --tags origin 2>/dev/null || true
13
if [[ -n "$(git tag --points-at HEAD)" ]]; then skip "HEAD is already tagged ($(git tag --points-at HEAD | tr '\n' ' '))"; fi
14
last="$(git tag -l | sed 's/^v//' | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n1 || true)"
15
if [[ -n "$last" ]]; then
16
lt="$(git tag -l "$last" "v$last" | head -n1)"
17
changed="$(git diff --name-only "$lt" HEAD -- . ':(exclude)*.md' ':(exclude)docs/' ':(exclude)blue-ci-cd.yml' ':(exclude).gitlab-ci.yml' ':(exclude).cursor/' || true)"
18
[[ -n "$changed" ]] || skip "only docs/CI changed since $lt"
19
fi
8
20
[[ "$v" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo "Invalid version: $v" >&2; exit 1; }
9
21
now="$(bash scripts/ci/next-version.sh)"
10
22
[[ "$now" == "$v" ]] || { echo "Version $v is already taken (next is $now). Rerun the pipeline." >&2; exit 1; }
11
23
asset() { printf '{"job":"%s","path":"%s","name":"%s"}' "$1" "$2" "$3"; }
12
assets="$(asset build:linux-deb dist/amd64.deb "posprint_${v}-1_amd64.deb"),$(asset build:linux-arch dist/x86_64.pkg.tar.zst "posprint-${v}-1-x86_64.pkg.tar.zst"),$(asset build:linux-arch dist/x86_64-bin.tar.gz "posprint-${v}-x86_64.tar.gz"),$(asset build:windows dist/posprint.exe posprint.exe)"
13
desc='* Debian/Ubuntu: posprint_<version>-1_amd64.deb\n* Arch: posprint-<version>-1-x86_64.pkg.tar.zst\n* Linux binary tarball (AUR posprint-bin): posprint-<version>-x86_64.tar.gz\n* Windows: posprint.exe\n\nAUR: posprint, posprint-bin.'
24
assets="$(asset build:linux-deb dist/amd64.deb "posprint_${v}-1_amd64.deb"),$(asset build:linux-arch dist/x86_64.pkg.tar.zst "posprint-${v}-1-x86_64.pkg.tar.zst"),$(asset build:linux-arch dist/x86_64-bin.tar.gz "posprint-${v}-x86_64.tar.gz"),$(asset build:windows dist/posprint.exe posprint.exe),$(asset build:macos dist/macos-universal.zip "posprint-${v}-macos-universal.zip")"
25
notes=""
26
if [[ -s RELEASE_NOTES.md ]]; then notes="$(python3 -c 'import json,sys;print(json.dumps(open("RELEASE_NOTES.md").read().strip()+"\n\n")[1:-1])' 2>/dev/null || sed ':a;N;$!ba;s/\\/\\\\/g;s/"/\\"/g;s/\n/\\n/g' RELEASE_NOTES.md)\n\n"; fi
27
desc="${notes}"'* Debian/Ubuntu: posprint_<version>-1_amd64.deb\n* Arch: posprint-<version>-1-x86_64.pkg.tar.zst\n* Linux binary tarball (AUR posprint-bin): posprint-<version>-x86_64.tar.gz\n* Windows: posprint.exe\n* macOS (universal, niet ondertekend): posprint-<version>-macos-universal.zip\n\nAUR: posprint, posprint-bin.'
14
28
body="$(printf '{"tag":"%s","commit":"%s","name":"posprint %s","body":"%s","assets":[%s]}' "$v" "$CI_COMMIT_SHA" "$v" "$desc" "$assets")"
15
29
echo "Release $v on $CI_COMMIT_SHA"
16
30
resp="$(mktemp)"
@@ -18,3 +32,4 @@ code="$(curl -sS -o "$resp" -w '%{http_code}' -X POST "$CI_API_URL/repos/$CI_PRO
18
32
-H "Authorization: Bearer $CI_JOB_TOKEN" -H "Content-Type: application/json" -d "$body")" || code=000
19
33
cat "$resp"; echo
20
34
[[ "$code" == 2* ]] || { echo "Release API returned HTTP $code" >&2; exit 1; }
35
echo "$v" > artifacts/released.txt
@@ -5,12 +5,26 @@ set -euo pipefail5
: "${CI_API_URL:?}" "${CI_JOB_TOKEN:?}" "${CI_COMMIT_SHA:?}" "${CI_PROJECT_PATH:?}"5
: "${CI_API_URL:?}" "${CI_JOB_TOKEN:?}" "${CI_COMMIT_SHA:?}" "${CI_PROJECT_PATH:?}"6
cd "$(dirname "$0")/../.."6
cd "$(dirname "$0")/../.."7
v="$(cat artifacts/version.txt)"7
v="$(cat artifacts/version.txt)"8
mkdir -p artifacts9
skip() { echo "No release: $1"; echo skip > artifacts/released.txt; exit 0; }10
# Never release twice: not when HEAD already carries a tag, and not when only11
# docs/CI files changed since the last version tag.12
git fetch -q --tags origin 2>/dev/null || true13
if [[ -n "$(git tag --points-at HEAD)" ]]; then skip "HEAD is already tagged ($(git tag --points-at HEAD | tr '\n' ' '))"; fi14
last="$(git tag -l | sed 's/^v//' | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n1 || true)"15
if [[ -n "$last" ]]; then16
lt="$(git tag -l "$last" "v$last" | head -n1)"17
changed="$(git diff --name-only "$lt" HEAD -- . ':(exclude)*.md' ':(exclude)docs/' ':(exclude)blue-ci-cd.yml' ':(exclude).gitlab-ci.yml' ':(exclude).cursor/' || true)"18
[[ -n "$changed" ]] || skip "only docs/CI changed since $lt"19
fi8
[[ "$v" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo "Invalid version: $v" >&2; exit 1; }20
[[ "$v" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo "Invalid version: $v" >&2; exit 1; }9
now="$(bash scripts/ci/next-version.sh)"21
now="$(bash scripts/ci/next-version.sh)"10
[[ "$now" == "$v" ]] || { echo "Version $v is already taken (next is $now). Rerun the pipeline." >&2; exit 1; }22
[[ "$now" == "$v" ]] || { echo "Version $v is already taken (next is $now). Rerun the pipeline." >&2; exit 1; }11
asset() { printf '{"job":"%s","path":"%s","name":"%s"}' "$1" "$2" "$3"; }23
asset() { printf '{"job":"%s","path":"%s","name":"%s"}' "$1" "$2" "$3"; }12
assets="$(asset build:linux-deb dist/amd64.deb "posprint_${v}-1_amd64.deb"),$(asset build:linux-arch dist/x86_64.pkg.tar.zst "posprint-${v}-1-x86_64.pkg.tar.zst"),$(asset build:linux-arch dist/x86_64-bin.tar.gz "posprint-${v}-x86_64.tar.gz"),$(asset build:windows dist/posprint.exe posprint.exe)"24
assets="$(asset build:linux-deb dist/amd64.deb "posprint_${v}-1_amd64.deb"),$(asset build:linux-arch dist/x86_64.pkg.tar.zst "posprint-${v}-1-x86_64.pkg.tar.zst"),$(asset build:linux-arch dist/x86_64-bin.tar.gz "posprint-${v}-x86_64.tar.gz"),$(asset build:windows dist/posprint.exe posprint.exe),$(asset build:macos dist/macos-universal.zip "posprint-${v}-macos-universal.zip")"13
desc='* Debian/Ubuntu: posprint_<version>-1_amd64.deb\n* Arch: posprint-<version>-1-x86_64.pkg.tar.zst\n* Linux binary tarball (AUR posprint-bin): posprint-<version>-x86_64.tar.gz\n* Windows: posprint.exe\n\nAUR: posprint, posprint-bin.'25
notes=""26
if [[ -s RELEASE_NOTES.md ]]; then notes="$(python3 -c 'import json,sys;print(json.dumps(open("RELEASE_NOTES.md").read().strip()+"\n\n")[1:-1])' 2>/dev/null || sed ':a;N;$!ba;s/\\/\\\\/g;s/"/\\"/g;s/\n/\\n/g' RELEASE_NOTES.md)\n\n"; fi27
desc="${notes}"'* Debian/Ubuntu: posprint_<version>-1_amd64.deb\n* Arch: posprint-<version>-1-x86_64.pkg.tar.zst\n* Linux binary tarball (AUR posprint-bin): posprint-<version>-x86_64.tar.gz\n* Windows: posprint.exe\n* macOS (universal, niet ondertekend): posprint-<version>-macos-universal.zip\n\nAUR: posprint, posprint-bin.'14
body="$(printf '{"tag":"%s","commit":"%s","name":"posprint %s","body":"%s","assets":[%s]}' "$v" "$CI_COMMIT_SHA" "$v" "$desc" "$assets")"28
body="$(printf '{"tag":"%s","commit":"%s","name":"posprint %s","body":"%s","assets":[%s]}' "$v" "$CI_COMMIT_SHA" "$v" "$desc" "$assets")"15
echo "Release $v on $CI_COMMIT_SHA"29
echo "Release $v on $CI_COMMIT_SHA"16
resp="$(mktemp)"30
resp="$(mktemp)"@@ -18,3 +32,4 @@ code="$(curl -sS -o "$resp" -w '%{http_code}' -X POST "$CI_API_URL/repos/$CI_PRO18
-H "Authorization: Bearer $CI_JOB_TOKEN" -H "Content-Type: application/json" -d "$body")" || code=00032
-H "Authorization: Bearer $CI_JOB_TOKEN" -H "Content-Type: application/json" -d "$body")" || code=00019
cat "$resp"; echo33
cat "$resp"; echo20
[[ "$code" == 2* ]] || { echo "Release API returned HTTP $code" >&2; exit 1; }34
[[ "$code" == 2* ]] || { echo "Release API returned HTTP $code" >&2; exit 1; }35
echo "$v" > artifacts/released.txt