From 3a6686af3f13ff30afe01c2928dd139b0420a3be Mon Sep 17 00:00:00 2001 From: Sean Smith Date: Thu, 11 Jan 2024 14:17:47 -0600 Subject: [PATCH] chore: Schedule python/node bindings builds (#2404) --- .github/workflows/nodejs-release.yml | 30 +++++++++++++++++++-------- .github/workflows/python-release.yaml | 9 ++++++++ 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/.github/workflows/nodejs-release.yml b/.github/workflows/nodejs-release.yml index 48dad76de..061a639ea 100644 --- a/.github/workflows/nodejs-release.yml +++ b/.github/workflows/nodejs-release.yml @@ -1,24 +1,35 @@ -name: nodejs-release -env: - DEBUG: napi:* - APP_NAME: "glaredb" - MACOSX_DEPLOYMENT_TARGET: "10.13" - PROTOC: "${{ github.workspace }}/deps/protoc/bin/protoc" -permissions: - contents: write - id-token: write +# Build and publish nodejs bindings. +# +# Publishing only happens for tag pushes with the tag beginning with 'v'. +name: nodejs release + on: + schedule: + # Run every Monday at 12:00 + - cron: 0 12 * * 1 push: tags: - "*" workflow_dispatch: + defaults: run: working-directory: bindings/nodejs + concurrency: group: nodejs-release-${{ github.ref }} cancel-in-progress: true +permissions: + contents: write + id-token: write + +env: + DEBUG: napi:* + APP_NAME: "glaredb" + MACOSX_DEPLOYMENT_TARGET: "10.13" + PROTOC: "${{ github.workspace }}/deps/protoc/bin/protoc" + jobs: build: strategy: @@ -127,6 +138,7 @@ jobs: publish: name: Publish + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') runs-on: ubuntu-2004-8-cores needs: - build diff --git a/.github/workflows/python-release.yaml b/.github/workflows/python-release.yaml index ca003cdfc..2d7333aea 100644 --- a/.github/workflows/python-release.yaml +++ b/.github/workflows/python-release.yaml @@ -1,19 +1,27 @@ +# Build and publish python bindings. +# +# Publishing only happens for tag pushes with the tag beginning with 'v'. name: python release on: push: tags: - "*" + schedule: + # Run every Monday at 12:00 + - cron: 0 12 * * 1 workflow_dispatch: permissions: contents: read + env: PYTHON_VERSION: "3.7" MATURIN_VERSION: "1.0.1" MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} MATURIN_USERNAME: "seanglaredb" PROTOC: "${{ github.workspace }}/deps/protoc/bin/protoc" + jobs: linux: runs-on: ubuntu-2004-8-cores @@ -104,6 +112,7 @@ jobs: release: name: Release + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') runs-on: ubuntu-latest needs: [linux, macos, windows] steps: