-
Notifications
You must be signed in to change notification settings - Fork 2
71 lines (55 loc) · 1.86 KB
/
publish.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Publish
on:
push:
branches: [master]
tags: ['*']
jobs:
publish-scm-1:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup luarocks
run: sudo apt install -y luarocks
- name: Setup cjson
run: luarocks install --local lua-cjson
- name: Upload rockspec scm-1
run: luarocks upload --force --api-key=${{ secrets.LUAROCKS_API_KEY }} molly-scm-1.rockspec
publish-tag:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
env:
TAG: ${GITHUB_REF##*/}
steps:
# https://github.com/luarocks/luarocks/wiki/Types-of-rocks
- uses: actions/checkout@v3
- name: Setup luarocks
run: sudo apt install -y luarocks
- name: Setup cjson
run: luarocks install --local lua-cjson
- name: Make a release
run: |
luarocks new_version --tag ${{ env.TAG }}
luarocks install --local molly-${{ env.TAG }}-1.rockspec
luarocks pack molly-${{ env.TAG }}-1.rockspec
- name: Upload .rockspec and .src.rock
run: |
luarocks upload --api-key=${{ secrets.LUAROCKS_API_KEY }} molly-${{ env.TAG }}-1.rockspec molly-${{ env.TAG }}-1.src.rock
publish-ldoc:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Clone the module
uses: actions/checkout@v3
- name: Setup luarocks
run: sudo apt install -y luarocks
- name: Setup dependencies
run: make deps-dev
- run: echo $(luarocks path --lr-bin) >> $GITHUB_PATH
- name: Build documentation with LDoc
run: make doc
- name: Publish generated API documentation to GitHub Pages
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: gh-pages
folder: doc/html