Skip to content

Commit

Permalink
ci: release please
Browse files Browse the repository at this point in the history
  • Loading branch information
pilotak committed Jan 13, 2024
1 parent 6e98d4a commit 1f6a720
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
37 changes: 29 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1f6a720

Please sign in to comment.