mirror of
https://github.com/Threnklyn/jira.git
synced 2026-06-05 04:28:28 +02:00
cicd: automated changelog and release
Signed-off-by: ldelossa <ldelossa@redhat.com>
This commit is contained in:
committed by
Louis DeLosSantos
parent
578c44c628
commit
31f7b03978
@@ -0,0 +1,97 @@
|
||||
---
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v1.*
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Release
|
||||
runs-on: 'ubuntu-latest'
|
||||
steps:
|
||||
- name: Setup
|
||||
run: |
|
||||
tag=`basename ${{ github.ref }}`
|
||||
cat <<.
|
||||
::set-env name=VERSION::${tag}
|
||||
.
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: ChangeLog
|
||||
shell: bash
|
||||
run: |
|
||||
curl -o git-chglog -L https://github.com/git-chglog/git-chglog/releases/download/0.9.1/git-chglog_linux_amd64
|
||||
chmod u+x git-chglog
|
||||
tag=`basename ${{ github.ref }}`
|
||||
echo "creating change log for tag: $tag"
|
||||
chglog="$(./git-chglog ${tag})"
|
||||
chglog="${chglog//'%'/'%25'}"
|
||||
chglog="${chglog//$'\n'/'%0A'}"
|
||||
chglog="${chglog//$'\r'/'%0D'}"
|
||||
cat <<.
|
||||
::set-env name=CHANGELOG::${chglog}
|
||||
.
|
||||
- name: Create Release
|
||||
uses: actions/create-release@latest
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: ${{ env.VERSION}} Release
|
||||
body: |
|
||||
${{ env.CHANGELOG }}
|
||||
prerelease: ${{ contains(env.VERSION, 'alpha') || contains(env.VERSION, 'beta') || contains(env.VERSION, 'rc') }}
|
||||
# perform production release of artifacts
|
||||
- name: Build Artifacts
|
||||
run: |
|
||||
VERSION=${{ env.VERSION }} make all
|
||||
- name: "Publish Darwin AMD64"
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./dist/github.com/go-jira/jira-drawin-amd64
|
||||
asset_name: jira-drawin-amd64
|
||||
asset_content_type: application/octet-stream
|
||||
- name: "Publish Linux 386"
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./dist/github.com/go-jira/jira-linux-386
|
||||
asset_name: jira-linux-386
|
||||
asset_content_type: application/octet-stream
|
||||
- name: "Publish Linux AMD64"
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./dist/github.com/go-jira/jira-linux-amd64
|
||||
asset_name: jira-linux-amd64
|
||||
asset_content_type: application/octet-stream
|
||||
- name: "Publish Windows 386"
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./dist/github.com/go-jira/jira-windows-386.exe
|
||||
asset_name: jira-windows-386.exe
|
||||
asset_content_type: application/octet-stream
|
||||
- name: "Publish Windows AMD64"
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./dist/github.com/go-jira/jira-windows-amd64.exe
|
||||
asset_name: jira-windows-amd64.exe
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
Reference in New Issue
Block a user