diff --git a/.github/workflows/craft-release.yaml b/.github/workflows/craft-release.yaml deleted file mode 100644 index 9b14210..0000000 --- a/.github/workflows/craft-release.yaml +++ /dev/null @@ -1,56 +0,0 @@ -name: Create Release -env: - MILESTONE: ${{ github.event.milestone.title }} -on: - milestone: - types: - - closed -jobs: - generate-changelog: - name: Generate Changelog - runs-on: ubuntu-latest - outputs: - changelog: ${{ steps.changelog.outputs.changelog }} - steps: - - name: Generate changelog - uses: WyriHaximus/github-action-jwage-changelog-generator@v1 - id: changelog - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - milestone: ${{ env.MILESTONE }} - - name: Show changelog - run: echo "${CHANGELOG}" - env: - CHANGELOG: ${{ steps.changelog.outputs.changelog }} - create-release: - name: Create Release - needs: - - generate-changelog - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - env: - CHANGELOG: ${{ needs.generate-changelog.outputs.changelog }} - - run: | - echo -e "${MILESTONE_DESCRIPTION}\r\n\r\n${CHANGELOG}" > release-${{ env.MILESTONE }}-release-message.md - cat release-${{ env.MILESTONE }}-release-message.md - release_message=$(cat release-${{ env.MILESTONE }}-release-message.md) - release_message="${release_message//'%'/'%25'}" - release_message="${release_message//$'\n'/'%0A'}" - release_message="${release_message//$'\r'/'%0D'}" - echo "::set-output name=release_message::$release_message" - id: releasemessage - env: - MILESTONE_DESCRIPTION: ${{ github.event.milestone.description }} - CHANGELOG: ${{ needs.generate-changelog.outputs.changelog }} - - name: Create Reference Release with Changelog - uses: fleskesvor/create-release@feature/support-target-commitish - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ env.MILESTONE }} - release_name: ${{ env.MILESTONE }} - body: ${{ steps.releasemessage.outputs.release_message }} - draft: false - prerelease: false diff --git a/.github/workflows/release-managment.yaml b/.github/workflows/release-managment.yaml new file mode 100644 index 0000000..d125036 --- /dev/null +++ b/.github/workflows/release-managment.yaml @@ -0,0 +1,26 @@ +name: Release Management +on: + pull_request: + types: + - opened + - labeled + - unlabeled + - synchronize + - reopened + - milestoned + - demilestoned + - ready_for_review + milestone: + types: + - closed +permissions: + contents: write + issues: write + pull-requests: write +jobs: + release-managment: + name: Create Release + uses: WyriHaximus/github-workflows/.github/workflows/package-release-managment.yaml@main + with: + milestone: ${{ github.event.milestone.title }} + description: ${{ github.event.milestone.title }}