Skip to content

Commit

Permalink
fix: #dev-deploy tag fix 7
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinbator authored Dec 3, 2024
1 parent a8a785e commit 402d6b5
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions .github/workflows/dev.kodemy.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,24 +191,28 @@ jobs:
name: Create tag
runs-on: self-hosted
steps:
- name: Set Dist Version
- name: Determine new tag
id: tag
run: |
BUILD_NUMBER="${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}"
echo "${BUILD_NUMBER}"
VERSION=$(echo $last_tag | awk -F. '{printf "v%d.%d.%d", $1, $2+1, 0}')
echo "DIST_VERSION=${VERSION}" >> $GITHUB_ENV
last_tag=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
echo "Last tag: $last_tag"
- name: Create Tag
uses: actions/github-script@v6
new_tag=$(echo $last_tag | awk -F. '{printf "v%d.%d.%d", $1, $2+1, 0}')
echo "New tag: $new_tag"
echo "TAG_NAME=$new_tag" >> $GITHUB_ENV
- name: Create tag
uses: actions/github-script@v5
with:
script: |
const {DIST_VERSION} = process.env
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/${DIST_VERSION}`,
sha: context.sha
})
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/${{ env.TAG_NAME }}`,
sha: context.sha
});

0 comments on commit 402d6b5

Please sign in to comment.