Skip to content

Commit

Permalink
test: test changelog workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
xMikux committed Sep 29, 2024
1 parent 7e06f71 commit 53a2b66
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 32 deletions.
60 changes: 39 additions & 21 deletions .github/workflows/release_versionts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,48 @@ on:
workflow_dispatch: {}

jobs:
version-gen-beta:
name: Version Generator
uses: ./.github/workflows/resuable_version.yml
if: |
github.repository == 'xMikux/Slimefun-Resourcepack'
with:
release_type: "beta"
version-gen-release:
name: Version Generator
uses: ./.github/workflows/resuable_version.yml
# version-gen-beta:
# name: Version Generator
# uses: ./.github/workflows/resuable_version.yml
# if: |
# github.repository == 'xMikux/Slimefun-Resourcepack'
# with:
# release_type: "beta"
# version-gen-release:
# name: Version Generator
# uses: ./.github/workflows/resuable_version.yml
# if: |
# github.repository == 'xMikux/Slimefun-Resourcepack'
# with:
# release_type: "release"
# generate-version-summary:
# name: Generate Version Summary
# runs-on: ubuntu-latest
# needs: [ version-gen-beta, version-gen-release ]
# steps:
# - name: Act - Summary
# run: |
# echo "# Version Summary" >> $GITHUB_STEP_SUMMARY
# echo "- Current Version: ``${{ needs.version-gen-release.outputs.version_semver_current_name }}``" >> $GITHUB_STEP_SUMMARY
# echo "- Next Version: ``${{ needs.version-gen-release.outputs.version_semver_next_name }}``" >> $GITHUB_STEP_SUMMARY
# echo "- SHA Version: ``${{ needs.version-gen-release.outputs.version_sha_name }}``" >> $GITHUB_STEP_SUMMARY
# echo "- PackFormat - Beta: ``${{ needs.version-gen-beta.outputs.pack_version_name }}``" >> $GITHUB_STEP_SUMMARY
# echo "- PackFormat - Release: ``${{ needs.version-gen-release.outputs.pack_version_name }}``" >> $GITHUB_STEP_SUMMARY

test-changelog:
name: Test Changelog
uses: ./.github/workflows/resuable_changelog.yml
if: |
github.repository == 'xMikux/Slimefun-Resourcepack'
with:
release_type: "release"
generate-version-summary:
name: Generate Version Summary
this_version: v1.2.0
next_version: v1.2.1

test-changelog-02:
name: Output Changelog
needs: test-changelog
runs-on: ubuntu-latest
needs: [ version-gen-beta, version-gen-release ]
steps:
- name: Act - Summary
- name: Output Changelog
run: |
echo "# Version Summary" >> $GITHUB_STEP_SUMMARY
echo "- Current Version: ``${{ needs.version-gen-release.outputs.version_semver_current_name }}``" >> $GITHUB_STEP_SUMMARY
echo "- Next Version: ``${{ needs.version-gen-release.outputs.version_semver_next_name }}``" >> $GITHUB_STEP_SUMMARY
echo "- SHA Version: ``${{ needs.version-gen-release.outputs.version_sha_name }}``" >> $GITHUB_STEP_SUMMARY
echo "- PackFormat - Beta: ``${{ needs.version-gen-beta.outputs.pack_version_name }}``" >> $GITHUB_STEP_SUMMARY
echo "- PackFormat - Release: ``${{ needs.version-gen-release.outputs.pack_version_name }}``" >> $GITHUB_STEP_SUMMARY
echo ${{ needs.test-changelog.changelog }}
27 changes: 16 additions & 11 deletions .github/workflows/resuable_changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Resuable | ChangeLog Generator
on:
workflow_call:
inputs:
this_version:
type: string
required: true
next_version:
type: string
required: true
Expand All @@ -18,21 +21,23 @@ jobs:
outputs:
changelog: ${{ steps.changelog.outputs.changes }}
steps:
-
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: 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 }}
writeToFile: false
tag: ${{ inputs.next_version }}
# tag: ${{ inputs.next_version }}
fromTag: ${{ inputs.this_version }}
toTag: ${{ inputs.next_version }}

0 comments on commit 53a2b66

Please sign in to comment.