-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (67 loc) · 2.34 KB
/
cl.yaml
File metadata and controls
79 lines (67 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
name: Changelog Pipeline
on:
push:
branches: ["develop"]
pull_request:
branches: ["develop"]
workflow_dispatch:
jobs:
update-changelog2:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Generate unreleased changelog
uses: orhun/git-cliff-action@v2
id: generate_unreleased_changelog
with:
config: ./cliff.toml
args: --unreleased --bump
env:
OUTPUT: CHANGELOG.md
- name: Print the changelog
run: cat "${{ steps.generate_unreleased_changelog.outputs.changelog }}"
- name: Format changelog for Slack
id: format_for_slack
run: |
output=$(python scripts/changelog_slack.py ${{ steps.generate_unreleased_changelog.outputs.changelog }})
echo "::set-output name=formatted_json::$output"
echo "Formatted JSON output for debugging: $output"
echo "Changelog for debugging: ${{ steps.generate_unreleased_changelog.outputs.changelog }}"
env:
UNRELEASED_CHANGELOG: ${{ steps.generate_unreleased_changelog.outputs.changelog }}
# - name: Debug Python
# id: debug_python
# run: |
# echo "Debug2 Python output for debugging: ${{ steps.format_for_slack.outputs.formatted_json }}"
- name: Send custom JSON data to Slack workflow
uses: slackapi/slack-github-action@v1.25.0
with:
channel-id: "C06N79SSDD5"
payload: ${{ steps.format_for_slack.outputs.formatted_json }}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
- name: Update CHANGELOG.md
uses: orhun/git-cliff-action@v2
with:
config: ./cliff.toml
args: --bump
env:
OUTPUT: CHANGELOG.md
- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "chore(changelog): update changelog [skip ci]"
- name: release
uses: actions/create-release@v1
with:
release_name: Release ${{ github.ref }}
tag_name: ${{ steps.generate_unreleased_changelog.outputs.version }}"
commitish: ${{ github.sha }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}