add back release pipeline

This commit is contained in:
Robert Kaussow 2021-09-18 18:48:18 +02:00
parent 3ad1abdaac
commit 1c010624b9
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 93 additions and 2 deletions

View File

@ -71,6 +71,56 @@ local PipelineTest(deps=[],) = {
},
};
local PipelineRelease(deps=[],) = {
kind: 'pipeline',
image_pull_secrets: ['docker_config'],
name: 'release',
platform: {
os: 'linux',
arch: 'amd64',
},
steps: [
{
name: 'changelog-generate',
image: 'thegeeklab/git-chglog',
commands: [
'git fetch -tq',
'git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased}',
],
},
{
name: 'changelog-format',
image: 'thegeeklab/alpine-tools',
commands: [
'prettier CHANGELOG.md',
'prettier -w CHANGELOG.md',
],
},
{
name: 'publish',
image: 'plugins/github-release',
settings: {
overwrite: true,
api_key: {
from_secret: 'github_token',
},
files: ['release/*'],
title: '${DRONE_TAG}',
note: 'CHANGELOG.md',
},
when: {
ref: [
'refs/tags/**',
],
},
},
],
depends_on: deps,
trigger: {
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
},
};
local PipelineDocs(deps=[],) = {
kind: 'pipeline',
name: 'docs',
@ -137,6 +187,7 @@ local PipelineNotifications(deps=[],) = {
[
PipelineTest(),
PipelineDocs(deps=['test']),
PipelineRelease(deps=['test'],),
PipelineDocs(deps=['release']),
PipelineNotifications(deps=['docs']),
]

View File

@ -45,6 +45,46 @@ volumes:
---
depends_on:
- test
image_pull_secrets:
- docker_config
kind: pipeline
name: release
platform:
arch: amd64
os: linux
steps:
- commands:
- git fetch -tq
- git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased
unreleased}
image: thegeeklab/git-chglog
name: changelog-generate
- commands:
- prettier CHANGELOG.md
- prettier -w CHANGELOG.md
image: thegeeklab/alpine-tools
name: changelog-format
- image: plugins/github-release
name: publish
settings:
api_key:
from_secret: github_token
files:
- release/*
note: CHANGELOG.md
overwrite: true
title: ${DRONE_TAG}
when:
ref:
- refs/tags/**
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
---
depends_on:
- release
kind: pipeline
name: docs
platform:
@ -105,6 +145,6 @@ trigger:
- failure
---
kind: signature
hmac: 758e035deda2239882aef0b1654916e376f5959883149f109dcb59a30faa9d96
hmac: 54d16ad27faa72c5a91fdd8fcf6031bdd15676183fc2edb1bd00db86551a306d
...