mirror of
https://codeberg.org/librewolf/source.git
synced 2024-12-22 13:43:04 -05:00
Add "Release" Stage to GitLab CI
This commit is contained in:
parent
0db2a9e59f
commit
c44517105f
1 changed files with 38 additions and 2 deletions
|
@ -1,11 +1,47 @@
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
|
- release
|
||||||
|
|
||||||
build-job:
|
Build:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- make all
|
- make all
|
||||||
|
- echo VERSION=$(cat version) >> variables.env
|
||||||
|
- echo RELEASE=$(cat release) >> variables.env
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- librewolf-*.source.*
|
- librewolf-*.source.tar.gz
|
||||||
|
reports:
|
||||||
|
dotenv: variables.env
|
||||||
|
|
||||||
|
Release:
|
||||||
|
stage: release
|
||||||
|
when: manual
|
||||||
|
allow_failure: false
|
||||||
|
image: ubuntu
|
||||||
|
needs:
|
||||||
|
- job: "Build"
|
||||||
|
artifacts: true
|
||||||
|
only:
|
||||||
|
- main
|
||||||
|
except:
|
||||||
|
- merge_requests
|
||||||
|
before_script:
|
||||||
|
- apt-get update
|
||||||
|
- apt-get install -y curl
|
||||||
|
- curl -L --output /usr/local/bin/release-cli "https://release-cli-downloads.s3.amazonaws.com/latest/release-cli-linux-amd64"
|
||||||
|
- chmod +x /usr/local/bin/release-cli
|
||||||
|
script:
|
||||||
|
- |
|
||||||
|
curl \
|
||||||
|
--header "JOB-TOKEN: $CI_JOB_TOKEN" \
|
||||||
|
--upload-file librewolf-$VERSION-$RELEASE.source.tar.gz \
|
||||||
|
"$CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/generic/librewolf-source/$VERSION-$RELEASE/librewolf-$VERSION-$RELEASE.source.tar.gz"
|
||||||
|
release:
|
||||||
|
tag_name: "$VERSION-$RELEASE"
|
||||||
|
description: "LibreWolf v$VERSION-$RELEASE"
|
||||||
|
assets:
|
||||||
|
links:
|
||||||
|
- name: librewolf-$VERSION-$RELEASE.source.tar.gz
|
||||||
|
link_type: package
|
||||||
|
url: $CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/generic/librewolf-source/$VERSION-$RELEASE/librewolf-$VERSION-$RELEASE.source.tar.gz
|
||||||
|
|
Loading…
Reference in a new issue