File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -13,13 +13,20 @@ jobs:
13
13
python-version : 3.9
14
14
- name : Install requirements
15
15
run : pip install -r requirements.txt
16
+ - name : Get current date
17
+ id : date
18
+ run : echo "::set-output name=date::$(date +'%Y-%m-%d_%H:%M:%S')"
19
+ - name : Get current timestamp
20
+ id : timestamp
21
+ run : echo "::set-output name=timestamp::$(date +'%s')"
16
22
- name : Test build Anki Deck
17
23
run : python generate.py --stop 3
18
24
env :
19
25
LEETCODE_CSRF_TOKEN : ${{ secrets.LEETCODE_CSRF_TOKEN }}
20
26
LEETCODE_SESSION_ID : ${{ secrets.LEETCODE_SESSION_ID }}
21
27
- name : Build Anki Deck
22
28
run : python generate.py
29
+ if : github.ref == 'refs/heads/master'
23
30
env :
24
31
LEETCODE_CSRF_TOKEN : ${{ secrets.LEETCODE_CSRF_TOKEN }}
25
32
LEETCODE_SESSION_ID : ${{ secrets.LEETCODE_SESSION_ID }}
29
36
env :
30
37
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
31
38
with :
32
- tag_name : ${{ github.ref }}
33
- release_name : Release ${{ github.ref }}
39
+ tag_name : ${{ github.ref }}-${{ steps.timestamp.outputs.timestamp }}
40
+ release_name : >
41
+ Anki Deck from ${{ github.ref }} on ${{ steps.date.outputs.date }}
34
42
draft : true
35
43
prerelease : true
36
44
- name : Upload release asset
You can’t perform that action at this time.
0 commit comments