Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(mlop-2455): add release please workflow #398

Merged
merged 3 commits into from
Feb 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 2 additions & 33 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: "Publish"
on:
push:
paths:
- 'setup.py'
tags:
- '*'

jobs:
Pipeline:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest

steps:
@@ -15,42 +14,12 @@ jobs:
with:
python-version: '3.9'

- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: microsoft

- uses: vemonet/setup-spark@v1
with:
spark-version: '3.5.1'
hadoop-version: '3'

- name: Install dependencies
run: make ci-install

- name: Build package
run: make package

- name: Get version
run: echo "version=$(grep __version__ setup.py | head -1 | cut -d \" -f2 | cut -d \' -f2)" >> $GITHUB_ENV

- name: Get release notes
id: get_release_notes
uses: ffurrer2/extract-release-notes@v1

- name: Create release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.version }}
release_name: Release ${{ env.version }}
body: ${{ steps.get_release_notes.outputs.release_notes }}

- name: Release already exist
if: ${{ failure() }}
run: echo Release already exist

- name: Publish release to pypi.org
if: ${{ success() }}
env:
23 changes: 23 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on:
push:
branches:
- staging

permissions:
contents: write
pull-requests: write

name: release-please

jobs:
release-please:
runs-on: github-actions-developers-runner
steps:
- uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
default-branch: staging
release-type: python
pull-request-title-pattern: "chore${scope}: ${version}"
config-file: release-please-config.json
manifest-file: .release-please-manifest.json