-
Notifications
You must be signed in to change notification settings - Fork 23
82 lines (78 loc) · 3.16 KB
/
release.yml
File metadata and controls
82 lines (78 loc) · 3.16 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
name: Build release
on:
workflow_dispatch:
release:
types: [created]
jobs:
build-linux:
name: Build linux
runs-on: ubuntu-latest
env:
RELEASE_OS: linux
steps:
- name: Checkout branch
uses: actions/checkout@master
- name: Setup environment
id: setup
run: echo ::set-output name=RELEASE_VERSION::${GITHUB_REF##*/}
- name: Build
run: |
docker run --rm dockbuild/centos5:latest > ./dockbuild \
&& chmod +x ./dockbuild \
&& ./dockbuild -a "-e RELEASE_OS=$RELEASE_OS -e RELEASE_VERSION=$RELEASE_VERSION" bash -c "make -f Makefile.release build && make -f Makefile.release compile_release_$RELEASE_OS"
env:
RELEASE_VERSION: ${{ steps.setup.outputs.RELEASE_VERSION }}
- name: Upload to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: release/bustools_${{ env.RELEASE_OS }}-${{ steps.setup.outputs.RELEASE_VERSION }}.tar.gz
asset_name: bustools_${{ env.RELEASE_OS }}-${{ steps.setup.outputs.RELEASE_VERSION }}.tar.gz
tag: ${{ github.ref }}
build-mac:
name: Build mac
runs-on: macos-latest
env:
RELEASE_OS: mac
steps:
- name: Checkout branch
uses: actions/checkout@master
- name: Setup environment
id: setup
run: echo ::set-output name=RELEASE_VERSION::${GITHUB_REF##*/}
- name: Build
run: make -f Makefile.release build && make -f Makefile.release compile_release_$RELEASE_OS
env:
RELEASE_VERSION: ${{ steps.setup.outputs.RELEASE_VERSION }}
- name: Upload to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: release/bustools_${{ env.RELEASE_OS }}-${{ steps.setup.outputs.RELEASE_VERSION }}.tar.gz
asset_name: bustools_${{ env.RELEASE_OS }}-${{ steps.setup.outputs.RELEASE_VERSION }}.tar.gz
tag: ${{ github.ref }}
build-windows:
name: Build windows
runs-on: ubuntu-latest
env:
RELEASE_OS: windows
steps:
- name: Checkout branch
uses: actions/checkout@master
- name: Setup environment
id: setup
run: echo ::set-output name=RELEASE_VERSION::${GITHUB_REF##*/}
- name: Build
run: |
docker run --rm dockcross/windows-static-x64:20221217-6afd127 > ./dockcross \
&& chmod +x ./dockcross \
&& ./dockcross -a "-e RELEASE_OS=$RELEASE_OS -e RELEASE_VERSION=$RELEASE_VERSION" bash -c "make -f Makefile.release install_zlib && make -f Makefile.release build && make -f Makefile.release compile_release_$RELEASE_OS"
env:
RELEASE_VERSION: ${{ steps.setup.outputs.RELEASE_VERSION }}
- name: Upload to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: release/bustools_${{ env.RELEASE_OS }}-${{ steps.setup.outputs.RELEASE_VERSION }}.zip
asset_name: bustools_${{ env.RELEASE_OS }}-${{ steps.setup.outputs.RELEASE_VERSION }}.zip
tag: ${{ github.ref }}