Skip to content
This repository has been archived by the owner on Sep 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #68 from mozilla-ai/sfriedowitz/trigger-test-on-wo…
Browse files Browse the repository at this point in the history
…rkflow-dispatch

Update TestPyPI to only occur on manual workflow dispatch
  • Loading branch information
Sean Friedowitz authored Feb 22, 2024
2 parents 27878d5 + 9485279 commit 407c814
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Publish to PyPI

on:
workflow_dispatch:
release:
types: [created,released]
types: [released]

jobs:
publish:
Expand All @@ -24,7 +25,7 @@ jobs:

- name: Publish to TestPyPI
uses: pypa/[email protected]
if: github.event_name == 'release' && github.event.action == 'created'
if: github.event_name == 'workflow_dispatch'
with:
password: ${{ secrets.PYPI_TEST_KEY }}
repository-url: https://test.pypi.org/legacy/
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ see the `examples/dev_submission` directory.
`.github/workflows/publish.yaml` contains the GitHub Action used to publish wheels to PyPI.
This workflow is triggered by the creation of GitHub Releases.
Draft releases trigger publishing to TestPyPI,
while full releases trigger the prod version.
The publishing workflow can be triggered in two ways:
1. Manually triggered on the GitHub Actions UI, which publishes the package to TestPyPI, or
2. Triggered by the creation of a GitHub release, which publishes to real PyPI.
When creating a GitHub release, make sure that the tag used for the release
matches the version of the target code branch.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "lm-buddy"
version = "0.2.3-rc.1"
version = "0.2.3"
authors = [
{ name = "Sean Friedowitz", email = "[email protected]" },
{ name = "Aaron Gonzales", email = "[email protected]" },
Expand Down

0 comments on commit 407c814

Please sign in to comment.