ci: add github release
This commit is contained in:
parent
5f9037251a
commit
9c3c2e8ea4
30
.github/workflows/tag.yml
vendored
30
.github/workflows/tag.yml
vendored
@ -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 }}
|
15
.github/workflows/tag_changelog_config.js
vendored
15
.github/workflows/tag_changelog_config.js
vendored
@ -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" },
|
||||
],
|
||||
};
|
@ -53,3 +53,17 @@ pipeline:
|
||||
files: release/*
|
||||
when:
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user