|
5 | 5 |
|
6 | 6 | jobs: |
7 | 7 | release: |
8 | | - runs-on: ubuntu-latest |
9 | | - |
10 | 8 | steps: |
11 | | - - name: Checkout repository |
| 9 | + - name: Perform release |
12 | 10 | uses: actions/checkout@v3 |
13 | 11 | with: |
14 | 12 | fetch-depth: 0 |
15 | 13 |
|
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" |
34 | 21 |
|
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 |
42 | 24 |
|
43 | | - - name: Upload GitHub Release |
| 25 | + - name: Upload github release |
44 | 26 | uses: softprops/action-gh-release@v1 |
45 | 27 | 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