Skip to content

Commit 4928864

Browse files
committed
update newest version
1 parent 1b25341 commit 4928864

File tree

1 file changed

+63
-59
lines changed

1 file changed

+63
-59
lines changed

.github/workflows/release.yml

Lines changed: 63 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,73 @@
11
---
2-
name: New release
2+
name: New release
33

4-
on:
5-
push:
6-
branches:
7-
- master
4+
on:
5+
push:
6+
branches:
7+
- master
88

9-
jobs:
10-
generate_changelog:
11-
runs-on: ubuntu-latest
12-
name: create release draft
13-
steps:
14-
- uses: actions/checkout@v1
9+
jobs:
10+
generate_changelog:
11+
runs-on: ubuntu-latest
12+
name: create release draft
13+
steps:
14+
- uses: actions/checkout@v2.3.4
15+
with:
16+
fetch-depth: 0
1517

16-
- name: 'Get Previous tag'
17-
id: previoustag
18-
uses: "WyriHaximus/github-action-get-previous-tag@master"
19-
env:
20-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
18+
- name: 'Get Previous tag'
19+
id: previoustag
20+
uses: "WyriHaximus/github-action-get-previous-tag@master"
21+
env:
22+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
2123

22-
- name: calculate next version
23-
id: version
24-
uses: patrickjahns/version-drafter-action@v1
25-
env:
26-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
- name: calculate next version
25+
id: version
26+
uses: patrickjahns/version-drafter-action@v1
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2729

28-
- name: Generate changelog
29-
uses: charmixer/auto-changelog-action@8095796
30-
with:
31-
token: ${{ secrets.GITHUB_TOKEN }}
32-
future_release: ${{ steps.version.outputs.next-version }}
30+
- name: Generate changelog
31+
uses: charmixer/auto-changelog-action@v1.1
32+
with:
33+
token: ${{ secrets.GITHUB_TOKEN }}
34+
future_release: ${{ steps.version.outputs.next-version }}
3335

34-
- name: push changelog
35-
uses: github-actions-x/commit@v2.6
36-
with:
37-
github-token: ${{ secrets.GITHUB_TOKEN }}
38-
push-branch: 'master'
39-
commit-message: 'update changelog'
40-
force-add: 'true'
41-
files: CHANGELOG.md
42-
name: T-Systems MMS
43-
email: frage@t-systems-mms.com
36+
- name: push changelog
37+
uses: github-actions-x/commit@v2.6
38+
with:
39+
github-token: ${{ secrets.GITHUB_TOKEN }}
40+
push-branch: 'master'
41+
commit-message: 'update changelog'
42+
force-add: 'true'
43+
files: CHANGELOG.md
44+
name: T-Systems MMS
45+
email: frage@t-systems-mms.com
4446

45-
- name: Generate changelog for the release
46-
uses: charmixer/auto-changelog-action@8095796
47-
with:
48-
token: ${{ secrets.GITHUB_TOKEN }}
49-
since_tag: ${{ steps.previoustag.outputs.tag }}
50-
future_release: ${{ steps.version.outputs.next-version }}
51-
output: CHANGELOGRELEASE.md
47+
# do a second checkout to prevent race situation
48+
# changelog gets updated but action works on old commit id
49+
- uses: actions/checkout@v2.3.4
50+
with:
51+
ref: master
5252

53-
- name: Read CHANGELOG.md
54-
id: package
55-
uses: juliangruber/read-file-action@v1
56-
with:
57-
path: ./CHANGELOGRELEASE.md
53+
- name: Generate changelog for the release
54+
run: |
55+
sed '/## \[${{ steps.previoustag.outputs.tag }}\]/Q' CHANGELOG.md > CHANGELOGRELEASE.md
5856
59-
- name: Create Release draft
60-
id: create_release
61-
uses: actions/create-release@v1
62-
env:
63-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
64-
with:
65-
release_name: ${{ steps.version.outputs.next-version }}
66-
tag_name: ${{ steps.version.outputs.next-version }}
67-
body: |
68-
${{ steps.package.outputs.content }}
69-
draft: true
57+
- name: Read CHANGELOG.md
58+
id: package
59+
uses: juliangruber/read-file-action@v1
60+
with:
61+
path: ./CHANGELOGRELEASE.md
62+
63+
- name: Create Release draft
64+
id: create_release
65+
uses: actions/create-release@v1
66+
env:
67+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
68+
with:
69+
release_name: ${{ steps.version.outputs.next-version }}
70+
tag_name: ${{ steps.version.outputs.next-version }}
71+
body: |
72+
${{ steps.package.outputs.content }}
73+
draft: true

0 commit comments

Comments
 (0)