Skip to content

Commit

Permalink
Update release workflow to trigger on pull request
Browse files Browse the repository at this point in the history
* **Triggering**: Change workflow trigger from push to pull request on the main branch.
* **Naming**: Rename step from "Create release PR" to "Create a new release".
  • Loading branch information
nijanthanvijayakumar committed Aug 6, 2024
1 parent d18bafe commit 9171fc2
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Release

on:
pull_request:
branches:
- main
workflow_dispatch:

jobs:
pre-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Build pre-release wheel
run: |
poetry build
- name: Test pre-release wheel
run: |
poetry run pytest
release:
needs: pre-release
runs-on: ubuntu-latest
if: success()
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Create a new release
uses: google-github-actions/release-please-action@v2
with:
release-type: python
package-name: quinn
changelog-types: |
feat
fix
docs
style
refactor
perf
test
build
ci
chore
revert
include-contributors: true
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,11 @@ When you're finished with the changes, create a pull request, also known as a PR
- Don't forget to link PR to the issue if you are solving one.
- As you update your PR and apply changes, mark each conversation as resolved.
- If you run into any merge issues, checkout this [git tutorial](https://github.com/skills/resolve-merge-conflicts) to help you resolve merge conflicts and other issues.

### Release Process

We use `release-please` to automate the release process. The release process includes generating and updating the CHANGELOG automatically, including contributor handles/names.

#### Commit Message Guidelines

To ensure that `release-please` can correctly generate the CHANGELOG and determine the version number, please follow the commit message guidelines specified [here](https://github.com/googleapis/release-please?tab=readme-ov-file#how-should-i-write-my-commits).
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -538,3 +538,7 @@ We are using [PySpark code-style](https://github.com/MrPowers/spark-style-guide/
:rtype: [ReturnType]
"""
```

### Release Process

We use `release-please` to automate the release process. The release process includes generating and updating the CHANGELOG automatically, including contributor handles/names. For more details, refer to the release-please section in the CONTRIBUTING.md file.

0 comments on commit 9171fc2

Please sign in to comment.