From 1f6a720cbd0859b70c398b4ecb68fc74892fa026 Mon Sep 17 00:00:00 2001 From: Pavel S Date: Sat, 13 Jan 2024 14:25:25 +0100 Subject: [PATCH] ci: release please --- .github/workflows/release.yaml | 37 ++++++++++++++++++++++++++------- .github/workflows/validate.yaml | 2 +- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d0e0d62..07428ed 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,33 +2,54 @@ name: release on: push: - tags: - - "v*" + branches: + - master jobs: + release_helper: + runs-on: ubuntu-latest + outputs: + release: ${{ steps.release.outputs.release_created }} + major: ${{ steps.release.outputs.major }} + minor: ${{ steps.release.outputs.minor }} + patch: ${{ steps.release.outputs.patch }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - uses: google-github-actions/release-please-action@v4 + id: release + with: + release-type: python + pull-request-header: ":robot: New release version" + pull-request-title-pattern: "chore: release${component} ${version}" + release: runs-on: ubuntu-latest + needs: release_helper + if: ${{ needs.release_helper.outputs.release }} steps: - name: Checkout uses: actions/checkout@v4 + - name: Prepare + id: prepare + run: | + echo "::set-output name=version::${{ needs.release_helper.outputs.major }}.${{ needs.release_helper.outputs.minor }}.${{ needs.release_helper.outputs.patch }}" + - name: Setup Python uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: "3.10" - name: Install run: | pip install setuptools wheel pip install -r requirements.txt - - name: Extract tag name - id: tag - run: echo ::set-output name=TAG_NAME::$(echo $GITHUB_REF | cut -d / -f 3) - - name: Update version run: | - sed -i "s/{{VERSION_PLACEHOLDER}}/${{ steps.tag.outputs.TAG_NAME }}/g" setup.py + sed -i "s/{{VERSION_PLACEHOLDER}}/${{ steps.prepare.outputs.version }}/g" setup.py - name: Build wheel run: | diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml index 13c3160..2917660 100644 --- a/.github/workflows/validate.yaml +++ b/.github/workflows/validate.yaml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] steps: - name: Checkout