Merge branch 'issues/14'

* issues/14:
  Add job to create a release on a schedule
  CI: Add SPDX license identifier for GPL-3.0-or-later
This commit is contained in:
David Runge 2021-06-12 20:41:15 +02:00
commit a0f37bdb8a
No known key found for this signature in database
GPG key ID: 7258734B41C31549
2 changed files with 40 additions and 0 deletions

View file

@ -14,6 +14,8 @@ variables:
stages:
- check
- build
- prepare
- publish
shellcheck:
before_script:
@ -57,3 +59,39 @@ secure_build:
- tags@archlinux/releng
tags:
- secure
prepare_release:
artifacts:
reports:
dotenv: variables.env
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule" && $CI_PROJECT_PATH == "archlinux/releng" && $SCHEDULED_PUBLISH == "TRUE"'
script:
- printf "TAG=%(%Y.%m.%d)T.%s\n" -1 "${CI_JOB_ID}" > variables.env
- printf "VERSION=%(%Y.%m.%d)T\n" -1 >> variables.env
stage: prepare
tags:
- secure
create_release:
before_script:
- pacman -Syu --needed --noconfirm release-cli
needs:
- job: prepare_release
artifacts: true
release:
name: 'Release ${TAG}'
description: 'Auto-created release ${TAG} (version ${VERSION}).'
tag_name: '$TAG'
ref: '$CI_COMMIT_SHA'
assets:
links:
- name: 'Build artifacts'
url: '${CI_PROJECT_URL}/-/jobs/artifacts/${TAG}/browse/output?job=secure_build'
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule" && $CI_PROJECT_PATH == "archlinux/releng" && $SCHEDULED_PUBLISH == "TRUE"'
script:
- printf "Creating release %s...\n" "${TAG}"
stage: publish
tags:
- secure

View file

@ -1,5 +1,7 @@
#!/usr/bin/env bash
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
# This script is run within a virtual environment to build the available archiso profiles and their available build
# modes and create checksum files for the resulting images.
# The script needs to be run as root and assumes $PWD to be the root of the repository.