Skip to content

Commit

Permalink
Merge pull request #60 from rdohms/task/new-workflows
Browse files Browse the repository at this point in the history
New Milestone Managment GHA
  • Loading branch information
rdohms authored Oct 17, 2021
2 parents d61167a + ca48ded commit e1b47df
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/promote-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Releases

on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
with:
ref: ${{ github.ref }}
- name: Pick Release Version from git tag
id: version
run: |
echo "::set-output name=version::${GITHUB_REF#refs/*/}"
- name: Debug Release Version
run: echo "Extracted this version ${{ steps.version.outputs.version }}"
- name: Pick Changelog from git tag
id: changelog
run: |
OUTPUT=$(git tag -l --format='%(contents:body)' ${GITHUB_REF#refs/*/})
OUTPUT="${OUTPUT//'%'/'%25'}"
OUTPUT="${OUTPUT//$'\n'/'%0A'}"
OUTPUT="${OUTPUT//$'\r'/'%0D'}"
echo "::set-output name=body::$OUTPUT"
- name: Debug Changelog
run: echo "Extracted this Changelog \n ${{ steps.changelog.outputs.body }}"
- uses: ncipollo/release-action@v1
with:
body: ${{ steps.changelog.outputs.body }}
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ steps.version.outputs.version }}
tag: ${{ steps.version.outputs.version }}
allowUpdates: true
14 changes: 14 additions & 0 deletions .github/workflows/update-milestone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'Update Milestone on Release'

on:
release:
types: [published]

jobs:
update-milestone-on-release:
runs-on: ubuntu-latest
steps:
- name: 'Update Milestone on Release'
uses: mhutchie/update-milestone-on-release@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit e1b47df

Please sign in to comment.