diff options
author | nodiscc <nodiscc@gmail.com> | 2020-03-11 21:16:26 +0300 |
---|---|---|
committer | nodiscc <nodiscc@gmail.com> | 2021-06-18 22:28:36 +0300 |
commit | 3eedf81f49c314225991bc945e3fa1159e1a9b31 (patch) | |
tree | 9d0a8ca203f98de339efe5864fa32395e92c7a1b /.gitlab-ci.yml | |
parent | d555b66452b82dd1563aad46b3ad2928b8ec8b03 (diff) |
automatically build and publish Debian packages at https://gitlab.com/nodiscc/pidgin-opensteamworks/-/releases
- https://gitlab.com/nodiscc/pidgin-opensteamworks/ configured to mirror https://github.com/EionRobb/pidgin-opensteamworks
- let gitlab CI build packages for debian stretch/buster on every git tag
- let gitlab CI create a release at https://gitlab.com/nodiscc/pidgin-opensteamworks/-/releases and link to the packages download page
- run a lintian pass on resulting packages
- use debian buster-backports image as checkinstall is only available in buster-backports
- update docuemnation
- https://docs.gitlab.com/ce/ci/yaml/README.html
- use CI_JOB_TOKEN to authenticate to the package registry
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..70870ea --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,60 @@ +stages: + - package + - release + - upload + +variables: + BUSTER_PACKAGE_FILENAME: "pidgin-opensteamworks_${CI_COMMIT_TAG}-buster0-1_amd64.deb" + STRETCH_PACKAGE_FILENAME: "pidgin-opensteamworks_${CI_COMMIT_TAG}-buster0-1_amd64.deb" + PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/pidgin-opensteamworks/${CI_COMMIT_TAG}" + +package-debian-stretch: + image: debian:stretch + stage: package + only: + - tags + script: + - apt update && apt -y --no-install-recommends install gcc checkinstall libpurple-dev libglib2.0-dev libjson-glib-dev libnss3-dev libsecret-1-dev lintian + - cd steam-mobile/ && checkinstall --pkgname=pidgin-opensteamworks --arch=amd64 --pkglicense=GPL-3.0 --pkgsource https://github.com/EionRobb/pidgin-opensteamworks --pkgversion=${CI_COMMIT_TAG}-stretch0 --requires="libpurple0,libglib2.0-0,libjson-glib-1.0-0,libnss3,libsecret-1-0" + - lintian *.deb || true + - mv *.deb ../ + artifacts: + paths: + - ./*.deb + +package-debian-buster: + image: debian:buster-backports + stage: package + only: + - tags + script: + - apt update && apt -y --no-install-recommends install gcc checkinstall libpurple-dev libglib2.0-dev libjson-glib-dev libnss3-dev libsecret-1-dev lintian + - cd steam-mobile/ && checkinstall --pkgname=pidgin-opensteamworks --arch=amd64 --pkglicense=GPL-3.0 --pkgsource https://github.com/EionRobb/pidgin-opensteamworks --pkgversion=${CI_COMMIT_TAG}-buster0 --requires="libpurple0,libglib2.0-0,libjson-glib-1.0-0,libnss3,libsecret-1-0" + - lintian *.deb || true + - mv *.deb ../ + artifacts: + paths: + - ./*.deb + +publish-release: + script: echo "publising release $CI_COMMIT_TAG" + image: registry.gitlab.com/gitlab-org/release-cli:latest + stage: release + release: + name: "$CI_COMMIT_TAG" + tag_name: "$CI_COMMIT_TAG" + ref: "$CI_COMMIT_TAG" + description: "Version $CI_COMMIT_TAG\n\nPackages for Debian 10/11 can be found in the [package registry](https://gitlab.com/nodiscc/pidgin-opensteamworks/-/packages?type=&sort=desc&orderBy=version&search[]=)" + only: + - tags + +upload_packages: + stage: upload + image: curlimages/curl:latest + only: + - tags + script: + - | + curl --fail -v --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${STRETCH_PACKAGE_FILENAME} ${PACKAGE_REGISTRY_URL}/${STRETCH_PACKAGE_FILENAME} + - | + curl --fail -v --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${BUSTER_PACKAGE_FILENAME} ${PACKAGE_REGISTRY_URL}/${BUSTER_PACKAGE_FILENAME} |