Merge pull request #35 from Az-r-ow/callbacks #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] #todo: add windows-latest | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
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 }}/* |