Skip to content
This repository has been archived by the owner on Jun 30, 2024. It is now read-only.

Commit

Permalink
Add release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Mircea Anton committed Feb 8, 2022
1 parent 58f9318 commit 535a1d4
Showing 1 changed file with 83 additions and 0 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
name: Build

on:
release:
types:
- published

jobs:
build-on-amd64:
runs-on: ubuntu-20.04
name: Build release binary on amd64

steps:
- uses: actions/checkout@v2

- name: Install deps
run: |
sudo apt-get update
sudo apt-get install libsfml-dev
- name: Build
run: |
make build-release
cp pacman pacmanMP-ubuntu2004_amd64
- name: Add compiled binary to release
uses: AButler/upload-release-assets@v2.0
with:
files: 'pacmanMP-ubuntu2004_amd64'
repo-token: ${{ secrets.GITHUB_TOKEN }}


build-on-other:
runs-on: ubuntu-18.04
name: Build release binary on ${{ matrix.arch }} ${{ matrix.distro }}

strategy:
matrix:
include:
- arch: armv6
distro: alpine_latest
- arch: armv7
distro: alpine_latest
- arch: aarch64
distro: alpine_latest
- arch: s390x
distro: alpine_latest
- arch: ppc64le
distro: alpine_latest

steps:
- name: Checkout code
uses: actions/checkout@v2.1.1

- name: Build on ${{ matrix.arch }} ${{ matrix.distro }}
uses: uraimo/run-on-arch-action@v2.1.1
id: runcmd
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}

setup: |
mkdir -p "${PWD}/artifacts"
dockerRunArgs: |
--volume "${PWD}/artifacts:/artifacts"
env: |
artifact_name: pacmanMP-${{ matrix.distro }}_${{ matrix.arch }}
install: |
apk add --update make
apk add --update g++
apk add --update sfml-dev
run: |
sudo apt-get update
sudo apt-get install libsfml-dev
- name: Add compiled binary to release
uses: AButler/upload-release-assets@v2.0
with:
files: 'artifacts/*'
repo-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 535a1d4

Please # to comment.