-
Notifications
You must be signed in to change notification settings - Fork 3
Automate PyPI Publishing via GitHub Actions #31
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
Open
yunks128
wants to merge
23
commits into
NASA-AMMOS:main
Choose a base branch
from
yunks128:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
639236d
auto publish pypi testing
yunks128 1511f22
file path fix
yunks128 7d6248e
Pypi publishing steps revised
yunks128 61a0d28
fix: semantic release workflow
yunks128 ecff5b7
0.0.9
7c164d4
Merge branch 'NASA-AMMOS:main' into main
yunks128 bb5e986
fix: semantic release workflow merged into pypi workflow
yunks128 c12a1c5
Merge branch 'main' of http://github.com/yunks128/slim-cli
yunks128 25dbb5b
0.0.10
d34579e
workflow improvement
yunks128 3a85ce2
workflow fix
yunks128 a29de4f
auto publish to pypi with semantic release
yunks128 b58da21
automated pypi testing
yunks128 e9c423a
fix: test semantic-release
yunks128 759c103
pypi semantic release
yunks128 9a0e800
pypi semantic release
yunks128 36ad5db
Revert "automated pypi testing"
yunks128 bcb88d7
0.0.11
fc292d3
version file manage
yunks128 b47c296
Merge branch 'main' of http://github.com/yunks128/slim-cli
yunks128 aa26e7a
fix: version file manage
yunks128 3956ce4
0.0.12
2bb31c1
Merge branch 'NASA-AMMOS:main' into main
yunks128 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| name: Publish Python 🐍 Package to PyPI | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'v0.0.8' # e.g., v1.2.3 | ||
|
yunks128 marked this conversation as resolved.
Outdated
|
||
|
|
||
| jobs: | ||
| publish: | ||
| name: Build and Publish to PyPI | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.11' | ||
|
|
||
| - name: Extract version from tag and update VERSION.txt | ||
|
yunks128 marked this conversation as resolved.
Outdated
|
||
| run: | | ||
| TAG_VERSION="${GITHUB_REF#refs/tags/v}" | ||
| echo "$TAG_VERSION" > src/jpl/slim/VERSION.txt | ||
| echo "Updated src/jpl/slim/VERSION.txt to $TAG_VERSION" | ||
|
|
||
| - name: Install build tools | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install build wheel twine | ||
|
yunks128 marked this conversation as resolved.
Outdated
|
||
|
|
||
| - name: Build package | ||
| run: python -m build . | ||
|
|
||
| - name: Publish to PyPI | ||
| env: | ||
| TWINE_USERNAME: __token__ | ||
| TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
| run: twine upload dist/* | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.