File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Automatic get latest tag
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ schedule :
6
+ - cron : " 11 0 * * *"
7
+
8
+ concurrency :
9
+ group : ${{ github.workflow }}-${{ github.ref }}
10
+ cancel-in-progress : true
11
+
12
+ jobs :
13
+ build :
14
+ name : Get latest tag
15
+ runs-on : ubuntu-latest
16
+ steps :
17
+ - name : Checkout Anki
18
+ uses : actions/checkout@v4
19
+ with :
20
+ fetch-depth : 0
21
+ repository : ankitects/anki
22
+ - name : Get latest tag
23
+ id : tag
24
+ run : echo "tag=$(git describe --tags `git rev-list --tags --max-count=1`)" >> "$GITHUB_OUTPUT"
25
+
26
+ - name : Checkout
27
+ uses : actions/checkout@v4
28
+ with :
29
+ ref : ${{ github.head_ref }}
30
+ fetch-depth : 0
31
+ - name : Add tag
32
+ run : |
33
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
34
+ git config --local user.name "github-actions[bot]"
35
+ git tag ${{ steps.tag.outputs.tag }}
36
+ git push origin --tags
You can’t perform that action at this time.
0 commit comments