Skip to content

Commit

Permalink
try again at creating a tag
Browse files Browse the repository at this point in the history
  • Loading branch information
dsschult committed Nov 26, 2024
1 parent 2603302 commit 51261dc
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,22 @@ jobs:

- name: Create Release
if: ${{ steps.checkTag.outputs.exists == 'false' }}
uses: "marvinpinto/action-automatic-releases@latest"
uses: actions/github-script@v7
with:
repo_token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
automatic_release_tag: "${{ steps.tag.outputs.tag }}"
prerelease: false
title: "${{ steps.tag.outputs.tag }}"
github-token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "refs/tags/${{ steps.tag.outputs.tag }}",
sha: context.sha
}).catch(err => {
if (err.status !== 422) throw err;
github.rest.git.updateRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "tags/${{ steps.tag.outputs.tag }}",
sha: context.sha
});
})

0 comments on commit 51261dc

Please sign in to comment.