Skip to content

Commit e1b47df

Browse files
authored
Merge pull request #60 from rdohms/task/new-workflows
New Milestone Managment GHA
2 parents d61167a + ca48ded commit e1b47df

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

.github/workflows/promote-tag.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Releases
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/[email protected]
14+
with:
15+
ref: ${{ github.ref }}
16+
- name: Pick Release Version from git tag
17+
id: version
18+
run: |
19+
echo "::set-output name=version::${GITHUB_REF#refs/*/}"
20+
- name: Debug Release Version
21+
run: echo "Extracted this version ${{ steps.version.outputs.version }}"
22+
- name: Pick Changelog from git tag
23+
id: changelog
24+
run: |
25+
OUTPUT=$(git tag -l --format='%(contents:body)' ${GITHUB_REF#refs/*/})
26+
OUTPUT="${OUTPUT//'%'/'%25'}"
27+
OUTPUT="${OUTPUT//$'\n'/'%0A'}"
28+
OUTPUT="${OUTPUT//$'\r'/'%0D'}"
29+
echo "::set-output name=body::$OUTPUT"
30+
- name: Debug Changelog
31+
run: echo "Extracted this Changelog \n ${{ steps.changelog.outputs.body }}"
32+
- uses: ncipollo/release-action@v1
33+
with:
34+
body: ${{ steps.changelog.outputs.body }}
35+
token: ${{ secrets.GITHUB_TOKEN }}
36+
name: ${{ steps.version.outputs.version }}
37+
tag: ${{ steps.version.outputs.version }}
38+
allowUpdates: true
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: 'Update Milestone on Release'
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
update-milestone-on-release:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: 'Update Milestone on Release'
12+
uses: mhutchie/update-milestone-on-release@master
13+
with:
14+
github-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)