diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 58fa3d43..ea364a5a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -5,11 +5,11 @@ on: inputs: tag: description: "Tag name, e.g. 0.4.0" - default: 0.4.0 + default: 0.6.0 required: true release: description: "Release name, e.g. release-0.4.0" - default: release-0.4.0 + default: release-0.6.0 required: true jobs: @@ -31,13 +31,23 @@ jobs: uses: actions/github-script@v5 with: script: | + + github.rest.git.createTag({ + owner: context.repo.owner, + repo: context.repo.repo, + tag: ${{ github.event.inputs.tag }, + message: ${{ github.event.inputs.tag }, + object: context.sha , + type, 'commit', + }) + github.rest.git.createRef({ owner: context.repo.owner, repo: context.repo.repo, ref: 'refs/tags/${{ github.event.inputs.tag }}', - sha: context.sha + sha: context.sha, }) - + - name: Create Release id: create_release uses: actions/create-release@v1 @@ -49,12 +59,14 @@ jobs: draft: false prerelease: false - + create-release-branch: name: Create release branch + permissions: + contents: write needs: [build] runs-on: ubuntu-latest - steps: + steps: - name: Create release branch uses: peterjgrainger/action-create-branch@v2.2.0 env: