File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ name : publish
2+
3+ on :
4+ push :
5+ branches :
6+ - ' master'
7+ tags :
8+ - ' *'
9+
10+ env :
11+ ROCK_NAME : ' mysql'
12+
13+ jobs :
14+ publish-rockspec-scm-1 :
15+ runs-on : ubuntu-20.04
16+ if : github.ref == 'refs/heads/master'
17+ steps :
18+ - uses : actions/checkout@v3
19+
20+ - uses : tarantool/rocks.tarantool.org/github-action@master
21+ with :
22+ auth : ${{ secrets.ROCKS_AUTH }}
23+ files : ${{ env.ROCK_NAME }}-scm-1.rockspec
24+
25+ publish-rockspec-tag :
26+ runs-on : ubuntu-20.04
27+ if : startsWith(github.ref, 'refs/tags')
28+ steps :
29+ - uses : actions/checkout@v3
30+
31+ # https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions
32+ - name : Set env
33+ run : echo "GIT_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
34+
35+ - name : Create release rockspec
36+ run : |
37+ sed \
38+ -e "s/branch = '.\+'/tag = '${GIT_TAG}'/g" \
39+ -e "s/version = '.\+'/version = '${GIT_TAG}-1'/g" \
40+ ${{ env.ROCK_NAME }}-scm-1.rockspec > ${{ env.ROCK_NAME }}-${GIT_TAG}-1.rockspec
41+ - uses : tarantool/rocks.tarantool.org/github-action@master
42+ with :
43+ auth : ${{ secrets.ROCKS_AUTH }}
44+ files : ${{ env.ROCK_NAME }}-${GIT_TAG}-1.rockspec
You can’t perform that action at this time.
0 commit comments