Remove windows from matrix #20
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: CI | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os[0] }} | |
strategy: | |
matrix: | |
os: [ | |
[macos-latest, arm64], | |
[macos-13, x86_64], | |
[ubuntu-latest, x86_64] | |
] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Compile native versions | |
run: | | |
make --debug | |
- name: Get short SHA | |
id: slug | |
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" | |
- name: Create tar archive (keep executable bit) | |
run: tar -zcvf ps2client-${{ steps.slug.outputs.sha8 }}-${{ matrix.os[0] }}-${{ matrix.os[1] }}.tar.gz bin | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ps2client-${{ steps.slug.outputs.sha8 }}-${{ matrix.os[0] }}-${{ matrix.os[1] }} | |
path: | | |
*tar.gz | |
build-win: | |
runs-on: ubuntu-latest | |
container: dockcross/windows-static-x86:latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Compile windows version with cross-compilator | |
run: | | |
make -f Makefile.mingw32 --trace | |
- name: Get short SHA | |
id: slug | |
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" | |
- name: Create tar archive | |
run: tar -zcvf ps2client-${{ steps.slug.outputs.sha8 }}-windows-latest-x86_64.tar.gz bin | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ps2client-${{ steps.slug.outputs.sha8 }}-windows-latest-x86_64 | |
path: | | |
*tar.gz | |
release: | |
needs: [build, build-win] | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get short SHA | |
id: slug | |
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" | |
- name: Download Mac x86_64 artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: ps2client-${{ steps.slug.outputs.sha8 }}-macos-13-x86_64 | |
- name: Download Mac arm64 artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: ps2client-${{ steps.slug.outputs.sha8 }}-macos-latest-arm64 | |
- name: Download Ubuntu artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: ps2client-${{ steps.slug.outputs.sha8 }}-ubuntu-latest-x86_64 | |
- name: Download Windows artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: ps2client-${{ steps.slug.outputs.sha8 }}-windows-latest-x86_64 | |
- name: Create pre-release | |
if: github.ref == 'refs/heads/master' | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: true | |
automatic_release_tag: "latest" | |
title: "Development build" | |
files: | | |
*tar.gz | |
- name: Create Tagged Release Draft | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
draft: true | |
files: | | |
*tar.gz |