-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (70 loc) · 2.2 KB
/
release.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
name: Create Release
on:
push:
tags:
- "v*"
env:
SCRIPTS_DIR: scripts
BUILD_DIR: build
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Initialize Submodules
run: git submodule init && git submodule update
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Get CMake
uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.26.0"
- name: Build Unix
if: ${{ matrix.os != 'windows-latest'}}
run: source ${{ env.SCRIPTS_DIR }}/build_without_tests.sh
- name: Build Windows
if: ${{ matrix.os == 'windows-latest' }}
run: .\${{ env.SCRIPTS_DIR }}\build_without_tests.bat
- name: Upload .so files Unix
if: ${{ matrix.os != 'windows-latest'}}
uses: actions/upload-artifact@v4
with:
name: dist-file-${{ matrix.os }}-${{ matrix.python-version }}
path: ${{ env.BUILD_DIR}}/*.so
if-no-files-found: error
retention-days: 1
- name: Upload Windows DDL files Windows
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/upload-artifact@v4
with:
name: dist-file-${{ matrix.os }}-${{ matrix.python-version }}
path: ${{ env.BUILD_DIR}}\*.pyd
if-no-files-found: error
retention-days: 1
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download distribution files
uses: actions/download-artifact@v4
with:
pattern: dist-file-*
path: ${{ env.BUILD_DIR }}
merge-multiple: true
- name: Create Release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.PAT }}
automatic_release_tag: "latest"
prerelease: true
title: "Pre-release"
files: ${{ env.BUILD_DIR }}/*