Skip to content

Commit

Permalink
Merge pull request #592 from ScilifelabDataCentre/DDS-1443-generate-s…
Browse files Browse the repository at this point in the history
…ignatures-for-releases

Publish to TestPyPi on PR and release
  • Loading branch information
i-oden authored Jan 18, 2023
2 parents 934011b + 12b803a commit 3165870
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/release-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,20 @@ jobs:
- name: Build the distribution
run: python setup.py sdist bdist_wheel

- name: Publish dist to TestPyPI
if: github.repository == 'ScilifelabDataCentre/dds_cli'
uses: pypa/gh-action-pypi-publish@release/v1
with:
print_hash: true
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true

- name: Publish dist to PyPI
if: github.repository == 'ScilifelabDataCentre/dds_cli'
uses: pypa/gh-action-pypi-publish@release/v1
with:
print_hash: true
user: __token__
password: ${{ secrets.pypi_password }}
skip_existing: true
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/test-pypi-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish CLI to TestPyPi
on:
pull_request:
branches: [dev]
jobs:
build-n-publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
name: Check out source-code repository

- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9

- name: Install python dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install .
- name: Build the distribution
run: python setup.py sdist bdist_wheel

- name: Publish dist to TestPyPI
if: github.repository == 'ScilifelabDataCentre/dds_cli'
uses: pypa/gh-action-pypi-publish@release/v1
with:
print_hash: true
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,3 +226,4 @@ Please add a _short_ line describing the PR you make, if the PR implements a spe
# Sprint (2023-01-09 - 2023-01-20)

- Workflow: Scan with Trivy on PR and schedule ([#591](https://github.com/ScilifelabDataCentre/dds_cli/pull/591))
- Workflow: Publish to TestPyPi on PR and release ([#592](https://github.com/ScilifelabDataCentre/dds_cli/pull/592))

0 comments on commit 3165870

Please sign in to comment.