ci: add github release

This commit is contained in:
Jack Bond-Preston 2022-07-07 23:07:44 +01:00
parent 5f9037251a
commit 9c3c2e8ea4
Signed by: jack
GPG Key ID: 010071F1482BA852
3 changed files with 14 additions and 45 deletions

View File

@ -1,30 +0,0 @@
name: Create Release
on:
push:
tags:
- '*'
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Create changelog text
id: changelog
uses: loopwerk/tag-changelog@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
config_file: .github/workflows/tag_changelog_config.js
- name: Create release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: ${{ steps.changelog.outputs.changes }}

View File

@ -1,15 +0,0 @@
module.exports = {
types: [
{ types: ["feat", "feature"], label: "🎉 New Features" },
{ types: ["fix", "bugfix"], label: "🐛 Bugfixes" },
{ types: ["improvements", "enhancement"], label: "🔨 Improvements" },
{ types: ["perf"], label: "🏎️ Performance Improvements" },
{ types: ["build", "ci"], label: "🏗️ Build System" },
{ types: ["refactor"], label: "🪚 Refactors" },
{ types: ["doc", "docs"], label: "📚 Documentation Changes" },
{ types: ["test", "tests"], label: "🔍 Tests" },
{ types: ["style"], label: "💅 Code Style Changes" },
{ types: ["chore"], label: "🧹 Chores" },
{ types: ["other"], label: "Other Changes" },
],
};

View File

@ -53,3 +53,17 @@ pipeline:
files: release/* files: release/*
when: when:
event: tag event: tag
github-release:
image: plugins/github-release
settings:
api_key:
from_secret: github-api-key
base_url: https://github.com/api/v3/
upload_url: https://github.com/api/uploads
files: release/*
environment:
- DRONE_REPO_OWNER=jackbondpreston
- CI_REPO_OWNER=jackbondpreston
when:
event: tag