Skip to content

Commit 679e694

Browse files
fortenforgeCopybara Bot
andauthored
Project import generated by Copybara. (Exafunction#133)
GitOrigin-RevId: f8c43ab04fb5a06f2ea78124ad84061140d9989c Co-authored-by: Copybara Bot <copybara@exafunction.com>
1 parent 6970a0c commit 679e694

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Add Version Tag
22

3-
on: push
3+
on:
4+
push:
5+
branches:
6+
- main
47

58
jobs:
69
build:
@@ -11,5 +14,14 @@ jobs:
1114
- name: Get version from file
1215
id: version
1316
run: echo ::set-output name=version::$(grep -oP "(?<=s:language_server_version = ')[^']+" autoload/codeium/server.vim)
14-
- name: Add tag to commit
15-
run: git tag ${{ steps.version.outputs.version }} && git push origin ${{ steps.version.outputs.version }}
17+
- name: Check if tag exists
18+
id: add_tag
19+
run: |
20+
if git rev-parse ${{ steps.version.outputs.version }} >/dev/null 2>&1; then
21+
echo "Tag already exists"
22+
exit 0
23+
else
24+
echo "Tag doesn't exist"
25+
git tag ${{ steps.version.outputs.version }} && git push origin ${{ steps.version.outputs.version }}
26+
fi
27+
shell: bash

0 commit comments

Comments
 (0)