From 89da37384b0a780787e1bffa9d5e02218bb946a9 Mon Sep 17 00:00:00 2001 From: natilou <30585029+natilou@users.noreply.github.com> Date: Thu, 13 Jul 2023 17:54:25 -0300 Subject: [PATCH] feat: initial version --- .github/workflows/ci.yaml | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4199a11..a480d56 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,6 +13,9 @@ jobs: release: runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write steps: @@ -27,26 +30,18 @@ jobs: id: changelog uses: TriPSs/conventional-changelog-action@v3 with: - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.PAT }} git-branch: 'release' - name: create release - 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 - }' + 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 }} build-and-push-image: needs: release