Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ on:
push:
tags:
- "*.*.*"
workflow_dispatch:
inputs:
publish_to_pypi:
description: 'Publish to PyPI'
required: true
type: boolean
default: true

jobs:
build:
Expand All @@ -29,6 +36,7 @@ jobs:
- name: Create release archive and notes
run: .github/workflows/create_archive_and_notes.sh
- name: Publish wheel dist
if: github.event_name == 'push' || github.event.inputs.publish_to_pypi
env:
# This special value tells pypi that the user identity is supplied within the token
TWINE_USERNAME: __token__
Expand Down
19 changes: 19 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,25 @@ final release (`X.Y.Z`).

Release automation will create a GitHub release and BCR pull request.

### Manually triggering the release workflow

The release workflow can be manually triggered using the GitHub CLI (`gh`).
This is useful for re-running a release or for creating a release from a
specific commit.

To trigger the workflow, use the `gh workflow run` command:

```shell
gh workflow run release.yml --ref <TAG>
```

By default, the workflow will publish the wheel to PyPI. To skip this step,
you can set the `publish_to_pypi` input to `false`:

```shell
gh workflow run release.yml --ref <TAG> -f publish_to_pypi=false
```

### Determining Semantic Version

**rules_python** uses [semantic version](https://semver.org), so releases with
Expand Down