Skip to content

Commit

Permalink
fix: #dev-deploy tag fix 4
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinbator authored Dec 3, 2024
1 parent 0d839cb commit 81885d3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/dev.kodemy.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,28 +190,28 @@ jobs:
create-tag:
name: Create tag
runs-on: self-hosted
# needs: [ build-and-deploy ]
steps:
- name: Determine new tag
id: tag
run: |
last_tag=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
echo "Last tag: $last_tag"
new_tag=$(echo $last_tag | awk -F. '{printf "v%d.%d.%d", $1, $2+1, 0}')
echo "New tag: $new_tag"
echo "tag=$new_tag" >> $GITHUB_ENV

echo "TAG_NAME=$new_tag" >> $GITHUB_ENV
- name: Create tag
uses: actions/github-script@v5
with:
script: |
const {TAG_NAME} = process.env
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${TAG_NAME}',
ref: `refs/tags/${{ env.TAG_NAME }}`,
sha: context.sha
})
});

0 comments on commit 81885d3

Please sign in to comment.