Skip to content

Commit

Permalink
CI: Replace tag-script with action
Browse files Browse the repository at this point in the history
[why]
To reduce the maintenance burden.

Signed-off-by: Fini Jastrow <[email protected]>
  • Loading branch information
Finii committed May 2, 2024
1 parent f843ba4 commit 50a4fef
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,27 +188,10 @@ jobs:
# Release part
- name: Create tag
if: ${{ github.event_name != 'pull_request' && !startsWith(github.ref, 'refs/tags/') && needs.check-for-new-cascadia.outputs.tag_exists != 'true' }}
uses: actions/github-script@v7
uses: EndBug/latest-tag@latest
with:
github-token: ${{ github.token }}
script: |
const tagName = "${{ needs.check-for-new-cascadia.outputs.tag_name }}";
const createdTag = await github.git.createTag({
owner: context.repo.owner,
repo: context.repo.repo,
tag: tagName,
message: `Bump Delugia version to ${tagName}`,
object: context.sha,
type: "commit"
})
github.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/${tagName}`,
sha: createdTag.data.sha
})
ref: ${{ needs.check-for-new-cascadia.outputs.tag_name }}
description: "Bump Delugia version to ${{ needs.check-for-new-cascadia.outputs.tag_name }}"
- name: Get tag name
id: get_tag_name
if: ${{ startsWith(github.ref, 'refs/tags/') }}
Expand Down

0 comments on commit 50a4fef

Please sign in to comment.