forked from php-amqplib/php-amqplib
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (50 loc) · 1.67 KB
/
changelog.yml
File metadata and controls
51 lines (50 loc) · 1.67 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
name: Update changelog
on:
workflow_dispatch:
release:
types:
- published
jobs:
run:
name: Update changelog
runs-on: ubuntu-latest
env:
CHANGELOG_GITHUB_TOKEN: ${{ secrets.CHANGELOG_GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: master
- uses: actions/cache/restore@v3
id: cache-restore
with:
key: changelog-generator
path: build/github-changelog-http-cache
- name: Generate changelog
uses: addnab/docker-run-action@v3
with:
image: githubchangeloggenerator/github-changelog-generator
options: "-v ${{ github.workspace }}:/github/workspace --env SRC_PATH=/github/workspace --env CHANGELOG_GITHUB_TOKEN --workdir /github/workspace"
run: "github_changelog_generator --user php-amqplib --project php-amqplib"
- name: Commit changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add CHANGELOG.md
git commit -m "update changelog" || true
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
- name: Clear cache
if: always()
uses: snnaplab/delete-branch-cache-action@v1
with:
key: ${{ steps.cache-restore.outputs.cache-primary-key }}
- name: Save changelog cache
if: always()
uses: actions/cache/save@v3
with:
key: ${{ steps.cache-restore.outputs.cache-primary-key }}
path: build/github-changelog-http-cache