Skip to content

Commit 3387048

Browse files
committed
c
1 parent c7ff2c8 commit 3387048

1 file changed

Lines changed: 13 additions & 31 deletions

File tree

.github/workflows/update-changelog.yml

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,25 @@ on:
55

66
jobs:
77
release:
8-
runs-on: ubuntu-latest
9-
108
steps:
11-
- name: Checkout repository
9+
- name: Perform release
1210
uses: actions/checkout@v3
1311
with:
1412
fetch-depth: 0
1513

16-
- name: Install Cocogitto CLI
17-
run: |
18-
ARCH=$(uname -m)
19-
OS=$(uname -s)
20-
curl -sLo cog https://github.com/cocogitto/cocogitto/releases/latest/download/cog-${OS}-${ARCH}
21-
chmod +x cog
22-
sudo mv cog /usr/local/bin/cog
23-
24-
- name: Generate changelog
25-
run: |
26-
VERSION=${GITHUB_REF#refs/tags/}
27-
echo "Generating changelog for $VERSION"
28-
cog changelog --at "$VERSION" -t full_hash > NEW_CHANGELOG.md
29-
30-
- name: Prepend to CHANGELOG.md
31-
run: |
32-
cat NEW_CHANGELOG.md CHANGELOG.md > TEMP_CHANGELOG.md
33-
mv TEMP_CHANGELOG.md CHANGELOG.md
14+
- name: Cocogitto release
15+
id: release
16+
uses: cocogitto/cocogitto-action@v3
17+
with:
18+
release: true
19+
git-user: "Cog Bot"
20+
git-user-email: "mycoolproject@org.org"
3421

35-
- name: Commit updated CHANGELOG.md
36-
run: |
37-
git config user.name "Cog Bot"
38-
git config user.email "mycoolproject@org.org"
39-
git add CHANGELOG.md
40-
git commit -m "docs: update changelog for ${{ github.ref_name }}"
41-
git push origin HEAD:main
22+
- name: Generate Changelog
23+
run: cog changelog --at ${{ steps.release.outputs.version }} -t full_hash > GITHUB_CHANGELOG.md
4224

43-
- name: Upload GitHub Release
25+
- name: Upload github release
4426
uses: softprops/action-gh-release@v1
4527
with:
46-
body_path: NEW_CHANGELOG.md
47-
tag_name: ${{ github.ref_name }}
28+
body_path: GITHUB_CHANGELOG.md
29+
tag_name: ${{ steps.release.outputs.version }}

0 commit comments

Comments
 (0)