-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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,53 @@ | ||
name: publish | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: condaforge/mambaforge | ||
volumes: | ||
- ${{ github.workspace }}:/github/workspace | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install dependencies | ||
run: mamba install -c conda-forge twine build pip setuptools wheel | ||
- name: Build Library | ||
run: python -m build --sdist --wheel | ||
- name: Expose wheel as artifact | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: dist | ||
path: dist | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build | ||
steps: | ||
- name: Download build artifact | ||
uses: actions/download-artifact@master | ||
with: | ||
name: dist | ||
path: dist | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
dist/sax-0.8.6.tar.gz | ||
dist/sax-0.8.6-py3-none-any.whl | ||
- name: Publish to PyPI | ||
run: | | ||
pip install --user twine \ | ||
&& twine upload \ | ||
dist/sax-0.8.6.tar.gz \ | ||
dist/sax-0.8.6-py3-none-any.whl \ | ||
--username __token__ \ | ||
--password ${{ secrets.PYPI_TOKEN }} | ||
This file contains 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