diff --git a/.github/workflows/create-new-pre-release.yml b/.github/workflows/create-new-pre-release.yml index e72a9f3..0dce8f1 100644 --- a/.github/workflows/create-new-pre-release.yml +++ b/.github/workflows/create-new-pre-release.yml @@ -15,16 +15,19 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set build version number run: | echo VERSION=$(cat VERSION).$GITHUB_RUN_NUMBER >> $GITHUB_ENV - name: Create GitHub pre-release - uses: marvinpinto/action-automatic-releases@919008cf3f741b179569b7a6fb4d8860689ab7f0 - with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: v${{ env.VERSION }} - prerelease: true - title: ${{ env.VERSION }} + run: | + gh api \ + --method POST \ + --header "Accept: application/vnd.github+json" \ + /repos/${GITHUB_REPOSITORY}/releases \ + -f tag_name='v${{ env.VERSION }}' \ + -f target_commitish='main' \ + -f name='${{ env.VERSION }}' \ + -F prerelease=true \ diff --git a/.github/workflows/release-new-action-version.yml b/.github/workflows/release-new-action-version.yml index b8d5503..d7901ee 100644 --- a/.github/workflows/release-new-action-version.yml +++ b/.github/workflows/release-new-action-version.yml @@ -1,11 +1,12 @@ -name: Release +name: Release new action version + on: release: types: [released] workflow_dispatch: inputs: TAG_NAME: - description: "Tag name that the major tag will point to" + description: 'Tag name that the major tag will point to' required: true env: @@ -22,6 +23,6 @@ jobs: steps: - name: Update the ${{ env.TAG_NAME }} tag id: update-major-tag - uses: actions/publish-action@v0.1.0 + uses: actions/publish-action@v0.3.0 with: source-tag: ${{ env.TAG_NAME }}