-
-
Notifications
You must be signed in to change notification settings - Fork 2
116 lines (100 loc) · 3.38 KB
/
releng.yml
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: releng
on:
push:
branches:
- master
tags:
- '*'
jobs:
qa:
runs-on: ubuntu-latest
container: archlinux:latest
strategy:
matrix:
include:
- lua-version: 5.4
pkg: lua
bin: lua
ver: LUA54
- lua-version: 5.3
pkg: lua53
bin: lua5.3
ver: LUA53
name: lua ${{ matrix.lua-version }}
steps:
- name: checkout
uses: actions/checkout@v2
- name: prepare
run: |
yes | pacman -Syu --noconfirm
pacman -Sy --noconfirm base-devel cmake openssl ${{ matrix.pkg }}
- name: build
run: |
mkdir build; cd build
cmake .. -D${{ matrix.ver }}=1 -DCMAKE_INSTALL_PREFIX=/usr
make
make install
- name: test
run: ${{ matrix.bin }} test.lua
release:
runs-on: ubuntu-latest
container: archlinux:latest
needs: qa
steps:
- name: checkout
uses: actions/checkout@v2
- name: prepare
run: |
yes | pacman -Syu --noconfirm
pacman -Sy --noconfirm base-devel git cmake openssl lua lua53
useradd -d /__w/srp/srp -s /bin/bash build
chown -R build /__w/srp/srp
- name: gather version
if: startsWith(github.ref, 'refs/tags/')
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: package
run: |
cd dist
su build -c "makepkg PKGVERSION=${{ steps.get_version.outputs.VERSION }}"
- name: release
if: startsWith(github.ref, 'refs/tags/')
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.token }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: upload wowpasswd
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/wowpasswd-${{ steps.get_version.outputs.VERSION }}-1-x86_64.pkg.tar.zst
asset_name: wowpasswd-${{ steps.get_version.outputs.VERSION }}-1-x86_64.pkg.tar.zst
asset_content_type: application/zstd
- name: upload lua53-srp
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/lua53-srp-${{ steps.get_version.outputs.VERSION }}-1-x86_64.pkg.tar.zst
asset_name: lua53-srp-${{ steps.get_version.outputs.VERSION }}-1-x86_64.pkg.tar.zst
asset_content_type: application/zstd
- name: upload lua-srp
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/lua-srp-${{ steps.get_version.outputs.VERSION }}-1-x86_64.pkg.tar.zst
asset_name: lua-srp-${{ steps.get_version.outputs.VERSION }}-1-x86_64.pkg.tar.zst
asset_content_type: application/zstd