-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from brainelectronics/feature/support-addition…
…al-version-data-in-python-version-file
- Loading branch information
Showing
7 changed files
with
111 additions
and
17 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,53 @@ | ||
# this file is *not* meant to cover or endorse the use of GitHub Actions, but rather to | ||
# help make automated releases for this project | ||
|
||
name: Upload Python Package to test.pypi.org | ||
|
||
on: [pull_request] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.9' | ||
- name: Install deploy dependencies | ||
run: | | ||
python -m pip install -U setuptools wheel build | ||
if [ -f requirements-deploy.txt ]; then pip install -r requirements-deploy.txt; fi | ||
pip install . | ||
- name: Build package | ||
run: | | ||
changelog2version \ | ||
--changelog_file changelog.md \ | ||
--version_file src/changelog2version/version.py \ | ||
--version_file_type py \ | ||
--additional_version_info="-rc${{ github.run_number }}.dev${{ github.event.number }}" \ | ||
--debug | ||
python -m build . | ||
- name: Test built package | ||
run: | | ||
twine check dist/*.tar.gz | ||
- name: Archive build package artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context | ||
# ${{ github.repository }} and ${{ github.ref_name }} can't be used for artifact name due to unallowed '/' | ||
name: dist_py.${{ github.event.repository.name }}_sha.${{ github.sha }}_build.${{ github.run_number }} | ||
path: dist/*.tar.gz | ||
retention-days: 14 | ||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@release/v1.5 | ||
with: | ||
repository_url: https://test.pypi.org/legacy/ | ||
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
skip_existing: true | ||
verbose: true | ||
print_hash: true |
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
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
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