Update .gitea/workflows/build.yaml
Some checks failed
Release Version / build (push) Failing after 47s
Some checks failed
Release Version / build (push) Failing after 47s
This commit is contained in:
parent
11af0e86f9
commit
313c8822cb
|
@ -23,22 +23,28 @@ jobs:
|
|||
go mod tidy
|
||||
go build -o s3-client
|
||||
|
||||
- name: Create release version
|
||||
id: create_version
|
||||
run: |
|
||||
latest_version=$(git describe --tags --abbrev=0 || echo "v0.0.0")
|
||||
new_version=$(echo $latest_version | awk -F. '{printf "v%d.%d.%d", $1, $2, $3+1}')
|
||||
echo "new_version=$new_version" >> $GITHUB_ENV
|
||||
|
||||
git tag $new_version
|
||||
git push origin $new_version
|
||||
|
||||
- name: Get latest commit ID
|
||||
id: get_commit
|
||||
run: |
|
||||
commit_id=$(git rev-parse HEAD)
|
||||
echo "commit_id=$commit_id" >> $GITHUB_ENV
|
||||
|
||||
- name: Get latest version and increment
|
||||
id: create_version
|
||||
run: |
|
||||
latest_version=$(git describe --tags --abbrev=0 || echo "v0.0.0")
|
||||
new_version=$(echo $latest_version | awk -F. '{printf "v%d.%d.%d", $1, $2, $3+1}')
|
||||
|
||||
if git rev-parse "$new_version" >/dev/null 2>&1; then
|
||||
echo "Tag $new_version already exists. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "new_version=$new_version" >> $GITHUB_ENV
|
||||
|
||||
git tag $new_version
|
||||
git push origin $new_version
|
||||
|
||||
- name: Create Release
|
||||
uses: actions/create-release@v1
|
||||
with:
|
||||
|
|
Loading…
Reference in New Issue
Block a user