Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github workflow for auto release #745

Merged
merged 1 commit into from
May 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Create release

on:
push:
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
build:
name: "🚀 Release"
runs-on: ubuntu-18.04
steps:
- name: "Check-out"
uses: actions/checkout@v1
- name: "Update Release CHANGELOG"
id: update-release-changelog
uses: heinrichreimer/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
onlyLastTag: true
stripHeaders: false
base: "CHANGELOG.md"
headerLabel: "# Changelog"
breakingLabel: '### Breaking'
enhancementLabel: '### Enhancements'
stripGeneratorNotice: true
bugsLabel: '### Fixes'
issues: true
issuesWoLabels: true
pullRequests: true
prWoLabels: true
author: false
verbose: true
- name: Commit CHANGELOG Changes
run: |
git add .
git config user.name "zihe.jia"
git config user.email "[email protected]"
git commit -m "Update CHANGELOG"
- name: Push CHANGELOG changes
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
force: true
- name: "Prepare for the Github Release"
id: generate-release-changelog
uses: heinrichreimer/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
output: "output.md"
headerLabel: "# Changelog"
onlyLastTag: true
stripHeaders: false
breakingLabel: '### Breaking'
enhancementLabel: '### Enhancements'
stripGeneratorNotice: true
bugsLabel: '### Fixes'
issues: true
issuesWoLabels: true
pullRequests: true
prWoLabels: true
author: false
verbose: true
- name: "🚀 Create GitHub Release"
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: ${{ steps.generate-release-changelog.outputs.changelog }}