-
Notifications
You must be signed in to change notification settings - Fork 1
82 lines (78 loc) · 2.33 KB
/
cd.yml
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
name: cd
on:
pull_request:
push:
branches:
- master
jobs:
build:
name: ${{ matrix.platform }} (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
platform:
# - linux-arm
# - linux-arm64
- linux-x64
# - linux-x86
- macos-arm64
# - macos-x64
include:
# - { platform: linux-arm , os: ubuntu-latest }
# - { platform: linux-arm64 , os: ubuntu-latest }
- { platform: linux-x64, os: ubuntu-latest }
# - { platform: linux-x86 , os: ubuntu-latest }
- { platform: macos-arm64, os: macos-14 }
# - { platform: macos-x64 , os: macos-12 }
runs-on: ${{ matrix.os }}
env:
PLATFORM: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: Download tsdl
run: |
curl -o tsdl.gz -L "https://github.com/stackmystack/tsdl/releases/latest/download/tsdl-${{ matrix.platform }}.gz"
gunzip tsdl.gz
chmod +x tsdl
- name: Build
run: |
./tsdl build --out-dir lib/${{ matrix.platform}}
- name: Prepare git # To get tags from `git describe`
run: |
git fetch --prune --unshallow
- name: Make .deb
if: matrix.target.os == 'ubuntu-latest'
run: |
./package/deb
- name: Make zip and tar
run: |
./package/zip
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.vars.outputs.sha_short }}
name: Release ${{ github.ref }}-${{ steps.vars.outputs.sha_short }}
draft: true
files: |
./lib/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release-fixed-assets:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Prepare git # To get tags from `git describe`
run: git fetch --prune --unshallow
- name: Release
if: ${{ github.event_name == 'schedule' }}
uses: softprops/action-gh-release@v2
with:
name: Release
draft: true
prerelease: false
files: ref
tag_name: ${{ steps.vars.outputs.sha_short }}
make_latest: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}