-
Notifications
You must be signed in to change notification settings - Fork 0
126 lines (119 loc) · 3.74 KB
/
build.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
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
117
118
119
120
121
122
123
124
125
126
name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
strategy:
matrix:
version:
- "3.16.1"
- "3.16.0"
os:
- "ubuntu-22.04"
- "ubuntu-20.04"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update apt index
run: sudo apt update -y -qq
- name: Install dependency packages
run: |
sudo apt install -y -qq --no-install-recommends \
build-essential \
bison \
flex \
libssl-dev \
pkg-config \
libpcre3-dev \
libwww-perl \
libgnutls28-dev
- name: Download Source
run: |
wget -O - "https://codeload.github.com/inspircd/inspircd/tar.gz/v${{matrix.version}}" | tar xz
- name: Build Inspircd ${{matrix.version}}
run: bash install.sh ${{matrix.version}}
- name: Archive Artifacts
working-directory: run
run: tar cvzf ../inspircd.${{matrix.version}}.${{matrix.os}}.tar.gz ./*
- name: Upload archives
uses: actions/upload-artifact@v4
with:
name: inspircd.${{matrix.version}}.${{matrix.os}}.tar.gz
path: inspircd*.tar.gz
if-no-files-found: error
build-anope:
strategy:
matrix:
version:
- "2.0.12"
- "2.0.13"
- "2.0.14"
- "2.0.15"
os:
- "ubuntu-22.04"
- "ubuntu-20.04"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update apt index
run: sudo apt update -y -qq
- name: Install dependency packages
run: |
sudo apt install -y -qq --no-install-recommends \
build-essential \
bison \
flex \
libssl-dev \
pkg-config \
libpcre3-dev \
libwww-perl \
libgnutls28-dev \
make \
cmake \
libmysqlclient-dev
- name: Download source
run: |
wget -O - "https://codeload.github.com/anope/anope/tar.gz/${{matrix.version}}" | tar xz
- name: Download Snoonet Module Source
working-directory: "anope-${{matrix.version}}/"
run: |
wget -O - "https://codeload.github.com/snoonetIRC/anope-modules/tar.gz/master" | tar xz
- name: Build Anope ${{matrix.version}}
run: |
bash anope-install.sh ${{matrix.version}}
ls -la "anope-${{matrix.version}}"
- name: Archive Artifacts
working-directory: anope-${{matrix.version}}/services
run: tar cvzf ../../anope.${{matrix.version}}.${{matrix.os}}.tar.gz ./*
- name: Upload archives
uses: actions/upload-artifact@v4
with:
name: anope.${{matrix.version}}.${{matrix.os}}.tar.gz
path: anope.${{matrix.version}}.${{matrix.os}}.tar.gz
if-no-files-found: error
release:
needs: [build, build-anope]
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d-%H%M%S')"
- name: Download all workflow run artifacts
uses: actions/download-artifact@v4
- name: Create Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{steps.date.outputs.date}}"
prerelease: false
title: "Build ${{steps.date.outputs.date}}"
files: |
inspircd*/inspircd*.tar.gz
anope*/anope*.tar.gz