Push tags correctly
This commit is contained in:
parent
f8fc2cfcc6
commit
e4b349d283
@ -17,19 +17,21 @@ jobs:
|
|||||||
|
|
||||||
- name: Get Date and Build Number
|
- name: Get Date and Build Number
|
||||||
run: |
|
run: |
|
||||||
|
git fetch
|
||||||
|
git tag
|
||||||
DATE=$(date +'%Y.%m.%d')
|
DATE=$(date +'%Y.%m.%d')
|
||||||
git fetch --tags
|
|
||||||
TAG_COUNT=$(git tag -l "${DATE}.*" | wc -l)
|
TAG_COUNT=$(git tag -l "${DATE}.*" | wc -l)
|
||||||
BUILD_NUMBER=$(($TAG_COUNT + 1))
|
BUILD_NUMBER=$(($TAG_COUNT + 1))
|
||||||
BUILD_VERSION="${DATE}.${BUILD_NUMBER}-dev"
|
BUILD_VERSION="${DATE}.${BUILD_NUMBER}-dev"
|
||||||
echo "$BUILD_VERSION" > version.txt
|
echo "$BUILD_VERSION" > version.txt
|
||||||
|
echo "VERSION $BUILD_VERSION"
|
||||||
|
|
||||||
- name: Create Git Tag for Build
|
- name: Create Git Tag for Build
|
||||||
run: |
|
run: |
|
||||||
git config user.name "ci"
|
git config user.name "ci"
|
||||||
git config user.email "dev@sh-edraft.de"
|
git config user.email "dev@sh-edraft.de"
|
||||||
git tag ${{ env.BUILD_VERSION }}
|
git tag ${{ env.BUILD_VERSION }}
|
||||||
git push origin ${{ env.BUILD_VERSION }} --tags
|
git push origin --tags
|
||||||
|
|
||||||
- name: Upload build version artifact
|
- name: Upload build version artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
|
@ -17,19 +17,21 @@ jobs:
|
|||||||
|
|
||||||
- name: Get Date and Build Number
|
- name: Get Date and Build Number
|
||||||
run: |
|
run: |
|
||||||
|
git fetch
|
||||||
|
git tag
|
||||||
DATE=$(date +'%Y.%m.%d')
|
DATE=$(date +'%Y.%m.%d')
|
||||||
git fetch --tags
|
|
||||||
TAG_COUNT=$(git tag -l "${DATE}.*" | wc -l)
|
TAG_COUNT=$(git tag -l "${DATE}.*" | wc -l)
|
||||||
BUILD_NUMBER=$(($TAG_COUNT + 1))
|
BUILD_NUMBER=$(($TAG_COUNT + 1))
|
||||||
BUILD_VERSION="${DATE}.${BUILD_NUMBER}"
|
BUILD_VERSION="${DATE}.${BUILD_NUMBER}"
|
||||||
echo "$BUILD_VERSION" > version.txt
|
echo "$BUILD_VERSION" > version.txt
|
||||||
|
echo "VERSION $BUILD_VERSION"
|
||||||
|
|
||||||
- name: Create Git Tag for Build
|
- name: Create Git Tag for Build
|
||||||
run: |
|
run: |
|
||||||
git config user.name "ci"
|
git config user.name "ci"
|
||||||
git config user.email "dev@sh-edraft.de"
|
git config user.email "dev@sh-edraft.de"
|
||||||
git tag ${{ env.BUILD_VERSION }}
|
git tag ${{ env.BUILD_VERSION }}
|
||||||
git push origin ${{ env.BUILD_VERSION }} --tags
|
git push origin --tags
|
||||||
|
|
||||||
- name: Upload build version artifact
|
- name: Upload build version artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
|
Loading…
Reference in New Issue
Block a user