Skip to content

Commit

Permalink
ci(Changelog Generate): Better changelog generate
Browse files Browse the repository at this point in the history
  • Loading branch information
xMikux committed Sep 29, 2024
1 parent 63ce8d2 commit 7e06f71
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 36 deletions.
42 changes: 28 additions & 14 deletions .github/workflows/resuable_changelog.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,38 @@
name: Resuable | ChangeLog Generator

on:
workflow_call: {}
workflow_call:
inputs:
next_version:
type: string
required: true
outputs:
changelog:
description: "Changelog markdown"
value: ${{ jobs.changelog_generate.outputs.changelog }}

jobs:
item-models-upload:
name: Upload item models file
changelog_generate:
name: Generate Changelog
runs-on: ubuntu-latest
outputs:
changelog: ${{ steps.changelog.outputs.changes }}
steps:
-
name: Setup - Checkout Repository
uses: actions/checkout@v4
-
name: Compress - Item Models
run: |
zip -j9 item-models.zip Resourcepack/item-models.yml
name: GitHub - Create Draft Release
uses: ncipollo/[email protected]
with:
prerelease: true
draft: false
commit: ${{ github.sha }}
tag: ${{ inputs.next_version }}
name: ${{ inputs.next_version }}
body: "*pending*"
-
name: Artifact - Upload Item Models
uses: actions/upload-artifact@v4
name: Changelog - Generate Changelog
id: changelog
uses: requarks/changelog-action@v1
with:
name: config-item-models
path: item-models.zip

token: ${{ github.token }}
writeToFile: false
tag: ${{ inputs.next_version }}
25 changes: 3 additions & 22 deletions .github/workflows/resuable_release_gh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@ on:
next_version:
type: string
required: true
outputs:
changelog:
description: "Changelog markdown"
value: ${{ jobs.github_release.outputs.changelog }}
type: string
required: true

jobs:
github_release:
name: Release GitHub
runs-on: ubuntu-latest
outputs:
changelog: ${{ steps.changelog.outputs.changes }}
steps:
-
name: Artifact - Download Slimefun Resourcepack
Expand All @@ -30,22 +27,6 @@ jobs:
mv workdir/pack.zip Slimefun-ResourcePack.zip
mv workdir/*.zip .
ls -alh
-
name: GitHub - Create Draft Release
uses: ncipollo/[email protected]
with:
prerelease: true
draft: false
commit: ${{ github.sha }}
tag: ${{ inputs.next_version }}
name: ${{ inputs.next_version }}
body: "*pending*"
- name: Changelog - Generate Changelog
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
tag: ${{ inputs.next_version }}
-
name: GitHub - Update Release
uses: ncipollo/[email protected]
Expand All @@ -55,7 +36,7 @@ jobs:
makeLatest: true
tag: ${{ inputs.next_version }}
name: ${{ inputs.next_version }}
body: ${{ steps.changelog.outputs.changes }}
body: ${{ inputs.changelog }}
artifacts: |
Slimefun-ResourcePack.zip
item-models.zip
Expand Down

0 comments on commit 7e06f71

Please sign in to comment.