From 5062db8a4f1ec28bcb04eec33b8a4835ad5863e8 Mon Sep 17 00:00:00 2001 From: Sebastien Roy Date: Mon, 7 Oct 2024 12:02:22 -0400 Subject: [PATCH] make release its own workflow --- .github/workflows/main.yml | 8 -------- .github/workflows/release.yml | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0b27d2d..b624210 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,11 +7,6 @@ on: pull_request: branches: - main - release: - types: - - published -permissions: - id-token: write # This is required for requesting the JWT jobs: main-build: runs-on: ${{ matrix.os }} @@ -41,6 +36,3 @@ jobs: env: BUILD_OS: ${{ matrix.os }} CXX: ${{ matrix.compiler }} - - name: Publish release distributions to PyPI - if: github.event.release - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..2f21a1e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,32 @@ +# the name of this file must match the one in pypi.org config +name: Build/Test/Release +on: + release: + types: + - published +permissions: + id-token: write # This is required for requesting the JWT +jobs: + main-build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + compiler: [clang++-17] + python-version: ["3.10", "3.11", "3.12"] + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - name: Main Setup Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Main Build + uses: ./.github/actions/build + env: + BUILD_OS: ${{ matrix.os }} + CXX: ${{ matrix.compiler }} + - name: Publish release distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1