Skip to content

Commit

Permalink
A new set of base scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
harry-cpp committed Nov 2, 2023
0 parents commit 5bba3e0
Show file tree
Hide file tree
Showing 15 changed files with 654 additions and 0 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@

name: Build

on: [push, pull_request]

jobs:
build:
name: build-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-20.04]
fail-fast: false
steps:
- name: Add msbuild to PATH
if: runner.os == 'Windows'
uses: microsoft/[email protected]
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get install build-essential git make cmake autoconf automake \
libtool pkg-config libasound2-dev libpulse-dev libaudio-dev libjack-dev \
libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev \
libxinerama-dev libxxf86vm-dev libxss-dev libgl1-mesa-dev libdbus-1-dev \
libudev-dev libgles2-mesa-dev libegl1-mesa-dev libibus-1.0-dev \
fcitx-libs-dev libsamplerate0-dev libsndio-dev libwayland-dev \
libxkbcommon-dev libdrm-dev libgbm-dev
shell: bash
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Run CAKE
run: dotnet run --project ./build/Build.csproj
- name: Package artifacts
uses: actions/upload-artifact@main
with:
name: FreeType-${{ matrix.os }}
path: |
artifacts/*
deploy:
name: deploy
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
needs: [ build ]
if: ${{ github.event_name == 'push' }}
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Download artifacts for Windows x64
uses: actions/download-artifact@v3
with:
name: FreeType-windows-latest
path: artifacts-windows-x64
- name: Download artifacts for macOS
uses: actions/download-artifact@v3
with:
name: FreeType-macos-latest
path: artifacts-macos
- name: Download artifacts for Linux x64
uses: actions/download-artifact@v3
with:
name: FreeType-ubuntu-20.04
path: artifacts-linux-x64
- name: Run CAKE
run: dotnet run --project ./build/Build.csproj -- "--target=Package"
- name: Push packages
run: dotnet nuget push src/bin/Release/*.nupkg --source https://nuget.pkg.github.com/$GITHUB_REPOSITORY_OWNER/index.json --api-key ${GITHUB_TOKEN}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Make a release
uses: ncipollo/release-action@v1
with:
name: 'MonoGame.Library.FreeType ${{ github.ref_name }}'
tag: ${{ github.ref_name }}
allowUpdates: true
removeArtifacts: true
artifacts: "bin/Release/*.nupkg"
token: ${{ secrets.GITHUB_TOKEN }}
if: github.ref_type == 'tag'

Loading

0 comments on commit 5bba3e0

Please sign in to comment.