diff options
| author | A Farzat <a@farzat.xyz> | 2026-03-10 08:00:17 +0300 |
|---|---|---|
| committer | A Farzat <a@farzat.xyz> | 2026-03-10 08:00:17 +0300 |
| commit | 8f97fb1e7ebae2c59db28250ba656e8ed5956ab5 (patch) | |
| tree | a7c313d2ec5b8c8f508497ff49e3d4f0afcc3f0c | |
| parent | 7c98b3b57714b4a242e5ea962386922a04614885 (diff) | |
| download | oreilly-epub-8f97fb1e7ebae2c59db28250ba656e8ed5956ab5.tar.gz oreilly-epub-8f97fb1e7ebae2c59db28250ba656e8ed5956ab5.zip | |
Add release creation to GitLab CIv0.1.2
| -rw-r--r-- | .gitlab-ci.yml | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8e36b39..9778cfc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,7 @@ stages: - check - test + - build - release variables: @@ -35,11 +36,11 @@ test: - branches - tags -release: - stage: release +build: + stage: build needs: - test - # Only run on tags starting with "v". + # Run only for semver-like tags "vX.Y.Z". rules: - if: '$CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+$/' when: on_success @@ -86,3 +87,29 @@ release: paths: - dist/ expire_in: 1 week + +release: + stage: release + needs: + - job: build + artifacts: true + image: registry.gitlab.com/gitlab-org/cli:latest + # Run only for semver-like tags "vX.Y.Z". + rules: + - if: '$CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+$/' + when: on_success + - when: never + script: + # Visual inspection for debugging. + - ls -lh dist/ + # Authenticate glab using CLI tokens. + - glab auth login --job-token $CI_JOB_TOKEN + # Create (or update) the Release for this tag. + - glab release create "$CI_COMMIT_TAG" + --name "oreilly-epub $CI_COMMIT_TAG" + --notes "Automated release for $CI_COMMIT_TAG" + --use-package-registry + "dist/oreilly-epub-linux-x86_64#Linux x86_64#package" + "dist/oreilly-epub-linux-x86_64-musl#Linux x86_64 (musl)#package" + "dist/oreilly-epub-linux-aarch64#Linux ARM64#package" + "dist/oreilly-epub-linux-aarch64-musl#Linux ARM64 (musl)#package" |
