-
Notifications
You must be signed in to change notification settings - Fork 0
111 lines (93 loc) · 3.43 KB
/
build.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: build
on:
push:
tags:
- "*.*.*"
paths-ignore:
- README.md
- examples/**
- logo.png
- logo_readme.png
jobs:
build:
strategy:
matrix:
os:
- windows-latest
- ubuntu-20.04
# - macos-latest
arch: [x64]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout latest sources
uses: actions/checkout@v3
with:
path: .
- name: Cache vcpkg packages
uses: actions/cache@v3
with:
path: ${{ runner.temp }}/vcpkg
key: ${{ runner.os }}-vcpkg-v3
- name: Setup Re
uses: osdeverr/actions-setup-re@v4
with:
re-version: <=0.6.8 # The latest stable Re release available for all major platforms
- name: Check Re version
run: re version
- name: Set up VsDevCmd
if: runner.os == 'Windows'
uses: egor-tensin/vs-shell@v2
with:
arch: ${{ matrix.arch }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Run the bootstrap script
run: re do deploy --configuration release --arch ${{ matrix.arch }} --re-dev-deploy-path ${{ runner.temp }}/re-latest-build --vcpkg-root-path ${{ runner.temp }}/vcpkg
#env:
# RE_GITHUB_FORCE_SSH: 1
- name: Create CI artifact
uses: actions/upload-artifact@v3
with:
name: 're-${{ github.ref_name }}-${{ runner.os }}-${{ matrix.arch }}-${{ github.run_id }}'
path: '${{ runner.temp }}/re-latest-build/'
- name: Archive release files
uses: thedoctor0/[email protected]
with:
type: zip
filename: '${{ runner.temp }}/re-latest-build/re-${{ github.ref_name }}-${{ runner.os }}-${{ matrix.arch }}.zip'
directory: '${{ runner.temp }}/re-latest-build/'
- name: Create release
uses: softprops/[email protected]
with:
files: '${{ runner.temp }}/re-latest-build/re-${{ github.ref_name }}-${{ runner.os }}-${{ matrix.arch }}.zip'
- name: Create package definition
if: runner.os == 'Linux'
run: |
mkdir -p .debpkg/usr/local/lib/re/${{ github.ref_name }}/bin
mkdir -p .debpkg/usr/local/bin
mkdir -p .debpkg/debian
cp -p -R ${{ runner.temp }}/re-latest-build/* .debpkg/usr/local/lib/re/${{ github.ref_name }}/bin
echo "/usr/local/lib/re/${{ github.ref_name }}/bin/re /usr/local/bin/re-${{ github.ref_name }}" > .debpkg/debian/rebs.links
- id: create-debian-package
name: Create Debian package
if: runner.os == 'Linux'
uses: jiro4989/build-deb-action@v2
with:
package: rebs
desc: A modern build system for the future
package_root: .debpkg
maintainer: osdeverr
version: ${{ github.ref_name }}
- name: Upload Debian package as a CI artifact
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
name: re-package-${{ github.ref_name }}-${{ runner.os }}-amd64-${{ github.run_id }}
path: ${{ steps.create-debian-package.outputs.file_name }}
- name: Create package release
if: runner.os == 'Linux'
uses: softprops/action-gh-release@v1
with:
files: ${{ steps.create-debian-package.outputs.file_name }}