Cd to build dir #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} | |
- name: Archive Artifacts | |
working-directory: run | |
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 |