-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (77 loc) · 2.1 KB
/
release.yml
File metadata and controls
91 lines (77 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Release
on:
push:
tags:
- 'v*'
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libsdl2-dev build-essential
- name: Compile
run: make clean && make
- name: Package
run: |
mkdir -p singularity-linux
cp bin/singularity singularity-linux/
tar -czvf singularity-linux.tar.gz singularity-linux/
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: linux-artifact
path: singularity-linux.tar.gz
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
install: >-
mingw-w64-x86_64-gcc
mingw-w64-x86_64-SDL2
make
- name: Compile & Bundle
shell: msys2 {0}
run: make clean && make bundle-sdl2
- name: Package
shell: bash
run: |
mkdir -p singularity-windows
cp bin/singularity.exe singularity-windows/
cp bin/SDL2.dll singularity-windows/
7z a singularity-windows.zip singularity-windows/
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: windows-artifact
path: singularity-windows.zip
create-release:
needs: [build-linux, build-windows]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download Linux Artifact
uses: actions/download-artifact@v4
with:
name: linux-artifact
- name: Download Windows Artifact
uses: actions/download-artifact@v4
with:
name: windows-artifact
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
singularity-linux.tar.gz
singularity-windows.zip
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}