mirror of
https://github.com/Elpisdev/unsegaREBORN.git
synced 2026-09-22 22:28:11 +03:00
71 lines
1.7 KiB
YAML
71 lines
1.7 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
tags: ['[0-9]*']
|
|
|
|
jobs:
|
|
windows:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: MINGW64
|
|
install: mingw-w64-x86_64-clang mingw-w64-x86_64-lld
|
|
- name: inject keys
|
|
shell: bash
|
|
env:
|
|
KEYS: ${{ secrets.KEYS_INC }}
|
|
run: printf '%s\n' "$KEYS" > include/keys.inc
|
|
- name: build
|
|
shell: msys2 {0}
|
|
env:
|
|
DATECODE: ${{ github.ref_name }}
|
|
run: sh build.cmd
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: win-x64
|
|
path: build/unsegareborn-win-x64.exe
|
|
|
|
linux:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: deps
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y clang lld
|
|
- name: inject keys
|
|
env:
|
|
KEYS: ${{ secrets.KEYS_INC }}
|
|
run: printf '%s\n' "$KEYS" > include/keys.inc
|
|
- run: sed 's/\r$//' build.cmd | sh
|
|
env:
|
|
DATECODE: ${{ github.ref_name }}
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: linux-x64
|
|
path: build/unsegareborn-linux-x64
|
|
|
|
release:
|
|
needs: [windows, linux]
|
|
runs-on: ubuntu-latest
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
name: win-x64
|
|
path: win
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
name: linux-x64
|
|
path: linux
|
|
- uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: |
|
|
win/unsegareborn-win-x64.exe
|
|
linux/unsegareborn-linux-x64
|