Skip to content

Commit a82a950

Browse files
Switched prepare-release workflow to shared workflows
Signed-off-by: Bastian Schwarz <bastian@codename-php.de>
1 parent 5c9a173 commit a82a950

1 file changed

Lines changed: 9 additions & 43 deletions

File tree

.github/workflows/prepare-release.yml

Lines changed: 9 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -7,50 +7,16 @@ on:
77

88
jobs:
99
calculate_next_version:
10-
name: Calculate next release version
11-
runs-on: ubuntu-latest
12-
outputs:
13-
version: ${{ steps.version.outputs.next-version }}
14-
steps:
15-
- name: calculate next version
16-
id: version
17-
uses: patrickjahns/version-drafter-action@v1
18-
env:
19-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20-
10+
uses: codenamephp/workflows.common/.github/workflows/calculate-next-version.yml@main
2111
draft_release:
22-
name: Create draft release
23-
runs-on: ubuntu-latest
2412
needs: calculate_next_version
25-
steps:
26-
- name: draft release
27-
uses: release-drafter/release-drafter@v5
28-
with:
29-
version: ${{ format('{0}', needs.calculate_next_version.outputs.version) }}
30-
tag: ${{ format('{0}', needs.calculate_next_version.outputs.version) }}
31-
name: ${{ format('{0}', needs.calculate_next_version.outputs.version) }}
32-
env:
33-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34-
13+
uses: codenamephp/workflows.common/.github/workflows/draft-release.yml@main
14+
with:
15+
version: ${{ needs.calculate_next_version.outputs.version }}
3516
update_changelog:
36-
name: Update changelog
37-
runs-on: ubuntu-latest
17+
uses: codenamephp/workflows.common/.github/workflows/update-changelog.yml@main
3818
needs: calculate_next_version
39-
steps:
40-
- name: checkout
41-
uses: actions/checkout@v2
42-
43-
- name: create changelog
44-
uses: charmixer/auto-changelog-action@v1.1
45-
with:
46-
token: ${{ secrets.GITHUB_TOKEN }}
47-
exclude_labels: "duplicate,question,invalid,wontfix,skip-changelog"
48-
future_release: ${{ format('{0}', needs.calculate_next_version.outputs.version) }}
49-
release_branch: 'release'
50-
51-
- name: commit updated changelog
52-
uses: EndBug/add-and-commit@v7
53-
with:
54-
message: "[CHANGELOG] Updated changelog"
55-
add: "CHANGELOG.md"
56-
signoff: true
19+
with:
20+
ref: ${{github.ref_name}}
21+
future_release: ${{ needs.calculate_next_version.outputs.version }}
22+
release_branch: 'release'

0 commit comments

Comments
 (0)