Skip to content

Commit

Permalink
Update packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
PunkPun committed Sep 26, 2023
1 parent 36acbf4 commit cf3fa81
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 48 deletions.
89 changes: 89 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Continuous Integration

on:
push:
pull_request:

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
linux:
name: Linux (.NET 6.0)
runs-on: ubuntu-22.04

steps:
- name: Clone Repository
uses: actions/checkout@v3

- name: Install .NET 6.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'

- name: Prepare Environment
run: |
. mod.config;
awk '/\r$$/ { exit(1); }' mod.config || (printf "Invalid mod.config format. File must be saved using unix-style (LF, not CRLF or CR) line endings.\n"; exit 1);
- name: Check Code
run: |
make check
make check-packaging-scripts
- name: Check Mod
run: |
sudo apt-get install lua5.1
make check-scripts
make test
linux-mono:
name: Linux (mono)
runs-on: ubuntu-22.04

steps:
- name: Clone Repository
uses: actions/checkout@v3

- name: Prepare Environment
run: |
. mod.config;
awk '/\r$$/ { exit(1); }' mod.config || (printf "Invalid mod.config format. File must be saved using unix-style (LF, not CRLF or CR) line endings.\n"; exit 1);
- name: Check Code
run: |
# check-packaging-scripts does not depend on .net/mono, so is not needed here
mono --version
make RUNTIME=mono check
- name: Check Mod
run: |
# check-scripts does not depend on .net/mono, so is not needed here
make RUNTIME=mono test
windows:
name: Windows (.NET 6.0)
runs-on: windows-2019

steps:
- name: Clone Repository
uses: actions/checkout@v3

- name: Install .NET 6.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'

- name: Check Code
shell: powershell
run: |
# Work around runtime failures on the GH Actions runner
dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org
.\make.ps1 check
- name: Check Mods
run: |
choco install lua --version 5.1.5.52
$ENV:Path = $ENV:Path + ";C:\Program Files (x86)\Lua\5.1\"
.\make.ps1 check-scripts
.\make.ps1 test
24 changes: 0 additions & 24 deletions .github/workflows/deploy.yml

This file was deleted.

48 changes: 24 additions & 24 deletions .github/workflows/release.yml → .github/workflows/packaging.yml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
name: Release
name: Release Packaging

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
- '*'

permissions:
contents: write # for release creation (svenstaro/upload-release-action)

jobs:
linux:
name: Linux AppImages
runs-on: ubuntu-20.04

runs-on: ubuntu-22.04
steps:
- name: Clone Repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install .NET 6
uses: actions/setup-dotnet@v1
- name: Install .NET 6.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'

Expand All @@ -27,35 +28,34 @@ jobs:
run: |
make engine
mkdir -p build/linux
sudo apt install libfuse2
./packaging/linux/buildpackage.sh "${GIT_TAG}" "${PWD}/build/linux"
- name: Upload Packages
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
prerelease: true
overwrite: true
file_glob: true
file: build/linux/*

macos:
name: macOS Disk Images
name: macOS Disk Image
runs-on: macos-11

steps:
- name: Clone Repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install .NET 6
uses: actions/setup-dotnet@v1
- name: Install .NET 6.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'

- name: Prepare Environment
run: echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> ${GITHUB_ENV}

- name: Package Disk Images
- name: Package Disk Image
env:
MACOS_DEVELOPER_IDENTITY: ${{ secrets.MACOS_DEVELOPER_IDENTITY }}
MACOS_DEVELOPER_CERTIFICATE_BASE64: ${{ secrets.MACOS_DEVELOPER_CERTIFICATE_BASE64 }}
Expand All @@ -66,26 +66,25 @@ jobs:
make engine
mkdir -p build/macos
./packaging/macos/buildpackage.sh "${GIT_TAG}" "${PWD}/build/macos"
- name: Upload Packages
- name: Upload Package
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
prerelease: true
overwrite: true
file_glob: true
file: build/macos/*

windows:
name: Windows Installers
runs-on: ubuntu-20.04

runs-on: ubuntu-22.04
steps:
- name: Clone Repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install .NET 6
uses: actions/setup-dotnet@v1
- name: Install .NET 6.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'

Expand All @@ -94,17 +93,18 @@ jobs:
echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> ${GITHUB_ENV}
sudo apt-get update
sudo apt-get install nsis wine64
- name: Package Installers
run: |
make engine
mkdir -p build/windows
./packaging/windows/buildpackage.sh "${GIT_TAG}" "${PWD}/build/windows"
- name: Upload Packages
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
prerelease: true
overwrite: true
file_glob: true
file: build/windows/*
Empty file modified packaging/linux/buildpackage.sh
100644 → 100755
Empty file.
Empty file modified packaging/macos/buildpackage.sh
100644 → 100755
Empty file.
Empty file modified packaging/windows/buildpackage.sh
100644 → 100755
Empty file.

0 comments on commit cf3fa81

Please sign in to comment.