Skip to content

Commit 32a54f1

Browse files
authored
use shared release workflow (#105)
1 parent 4e3385c commit 32a54f1

File tree

1 file changed

+6
-64
lines changed

1 file changed

+6
-64
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -8,67 +8,9 @@ on:
88
- master
99

1010
jobs:
11-
generate_changelog:
12-
runs-on: ubuntu-latest
13-
name: create release draft
14-
steps:
15-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
16-
with:
17-
fetch-depth: 0
18-
19-
- name: 'Get Previous tag'
20-
id: previoustag
21-
uses: "WyriHaximus/github-action-get-previous-tag@master"
22-
env:
23-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
24-
25-
- name: calculate next version
26-
id: version
27-
uses: patrickjahns/version-drafter-action@fda4b8e4017bee5dd5794f255a4d484e8e647561 # v1
28-
env:
29-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30-
31-
- name: Generate changelog
32-
uses: charmixer/auto-changelog-action@b25e89c9410e03189f0d48b02b3a8caad6e78015 # v1.4
33-
with:
34-
token: ${{ secrets.GITHUB_TOKEN }}
35-
future_release: ${{ steps.version.outputs.next-version }}
36-
37-
- name: push changelog
38-
uses: github-actions-x/commit@722d56b8968bf00ced78407bbe2ead81062d8baa # v2.9
39-
with:
40-
github-token: ${{ secrets.GITHUB_TOKEN }}
41-
push-branch: 'master'
42-
commit-message: 'update changelog'
43-
force-add: 'true'
44-
files: CHANGELOG.md
45-
name: Deutsche Telekom MMS GmbH
46-
email: mms@telekom.de
47-
48-
# do a second checkout to prevent race situation
49-
# changelog gets updated but action works on old commit id
50-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
51-
with:
52-
ref: master
53-
54-
- name: Generate changelog for the release
55-
run: |
56-
sed '/## \[${{ steps.previoustag.outputs.tag }}\]/Q' CHANGELOG.md > CHANGELOGRELEASE.md
57-
58-
- name: Read CHANGELOG.md
59-
id: package
60-
uses: juliangruber/read-file-action@02bbba9876a8f870efd4ad64e3b9088d3fb94d4b # v1
61-
with:
62-
path: ./CHANGELOGRELEASE.md
63-
64-
- name: Create Release draft
65-
id: create_release
66-
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1
67-
env:
68-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
69-
with:
70-
release_name: ${{ steps.version.outputs.next-version }}
71-
tag_name: ${{ steps.version.outputs.next-version }}
72-
body: |
73-
${{ steps.package.outputs.content }}
74-
draft: true
11+
release:
12+
# docs: https://github.com/telekom-mms/.github#release
13+
if: github.repository != '$TEMPLATE_REPOSITORY'
14+
uses: telekom-mms/.github/.github/workflows/release.yml@main
15+
secrets:
16+
GH_BRANCH_PROTECTION_APP_TOKEN: ${{ secrets.GH_BRANCH_PROTECTION_APP_TOKEN }}

0 commit comments

Comments
 (0)