Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ca48ded

Browse files
committed
Automating Release Tasks
Added new workflows to auto-close milestones and to promote tags to releases.
1 parent d61167a commit ca48ded

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

‎.github/workflows/promote-tag.yml‎

Lines changed: 38 additions & 0 deletions
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/checkout@v2.3.4
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
Lines changed: 14 additions & 0 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /