diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3c77e09..440aa45 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,33 +17,32 @@ jobs: steps: - name: checkout uses: actions/checkout@v2 + run: git checkout -b release - name: conventional Changelog Action id: changelog uses: TriPSs/conventional-changelog-action@v3 with: github-token: ${{ secrets.GITHUB_TOKEN }} + git-branch: 'release' - name: create release - uses: actions/create-release@v1 - if: ${{ steps.changelog.outputs.skipped == 'false' }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ steps.changelog.outputs.tag }} - release_name: ${{ steps.changelog.outputs.tag }} - body: ${{ steps.changelog.outputs.clean_changelog }} - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v5 - with: - token: ${{ secrets.PAT }} - commit-message: Automated pull request for release - branch: release - title: Automated pull request for release - body: This pull request was automatically generated by GitHub Actions. - draft: false - delete-branch: true + run: | + curl -L \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}"\ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/${{ github.repository }}/releases \ + -d '{ + "tag_name": "${{ steps.changelog.outputs.tag }}", + "target_commitish":"release", + "name": "${{ steps.changelog.outputs.tag }}", + "body": "${{ steps.changelog.outputs.clean_changelog }}", + "draft": false, + "prerelease": false, + "generate_release_notes": true + }' build-and-push-image: needs: release