0
Fork 0
mirror of https://codeberg.org/librewolf/source.git synced 2024-12-22 21:53:31 -05:00
LibreWolf/.gitlab-ci.yml

60 lines
2.1 KiB
YAML
Raw Normal View History

2021-11-20 02:17:53 -05:00
stages:
- build
2022-01-21 15:51:43 -05:00
- release
2021-11-20 02:17:53 -05:00
2022-01-21 15:51:43 -05:00
Build:
2021-11-20 02:17:53 -05:00
stage: build
variables:
GIT_SUBMODULE_STRATEGY: recursive
2021-11-20 02:17:53 -05:00
script:
- make all
2022-01-21 15:51:43 -05:00
- echo VERSION=$(cat version) >> variables.env
- echo RELEASE=$(cat release) >> variables.env
- echo BUILD_JOB_ID=$CI_JOB_ID >> variables.env
2021-11-20 02:35:24 -05:00
artifacts:
paths:
2022-01-21 15:51:43 -05:00
- librewolf-*.source.tar.gz
- librewolf-*.source.tar.gz.sha256sum
2022-01-21 15:51:43 -05:00
reports:
dotenv: variables.env
2021-11-20 02:35:24 -05:00
2022-01-21 15:51:43 -05:00
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
2022-01-21 15:51:43 -05:00
- 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"
- |
curl \
--header "JOB-TOKEN: $CI_JOB_TOKEN" \
--upload-file librewolf-$VERSION-$RELEASE.source.tar.gz.sha256sum \
"$CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/generic/librewolf-source/$VERSION-$RELEASE/librewolf-$VERSION-$RELEASE.source.tar.gz.sha256sum"
2022-01-21 15:51:43 -05:00
release:
tag_name: "$VERSION-$RELEASE"
2022-02-07 07:35:18 -05:00
description: "## LibreWolf Source Release v$VERSION-$RELEASE\n\n- \n\n(Built on GitLab by job [$BUILD_JOB_ID](https://gitlab.com/librewolf-community/browser/source/-/jobs/$BUILD_JOB_ID))"
2022-01-21 15:51:43 -05:00
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
2022-02-05 14:51:54 -05:00
- name: librewolf-$VERSION-$RELEASE.source.tar.gz.sha256sum
link_type: other
url: $CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/generic/librewolf-source/$VERSION-$RELEASE/librewolf-$VERSION-$RELEASE.source.tar.gz.sha256sum