forked from etingof/pyasn1-modules
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare v0.3.0.rc1 with new release workflow (#3)
- Loading branch information
Showing
4 changed files
with
68 additions
and
5 deletions.
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,57 @@ | ||
--- | ||
name: Build and upload to PyPI | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: tag to build | ||
required: true | ||
type: string | ||
testpypi: | ||
description: upload to Test PyPI | ||
type: boolean | ||
default: false | ||
pypi: | ||
description: upload to PyPI | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
tests: | ||
uses: ./.github/workflows/main.yml | ||
pypi: | ||
name: Build and upload to PyPI | ||
runs-on: ubuntu-latest | ||
needs: tests | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ inputs.tag || github.ref }} | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: "Update pip" | ||
run: python -m pip install --upgrade pip setuptools wheel | ||
- name: "Install 'build' and 'twine'" | ||
run: python -m pip install --upgrade build twine | ||
- name: "Run 'build'" | ||
run: "python -m build" | ||
- name: "Run twine check" | ||
run: "python -m twine check dist/*" | ||
- name: Publish distribution to Test PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
if: inputs.testpypi || false | ||
- name: Publish distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
if: inputs.pypi || false |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# http://www.python.org/dev/peps/pep-0396/ | ||
__version__ = '0.3.0.dev1' | ||
__version__ = '0.3.0.rc1' |