Skip to content

Commit

Permalink
test deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
RMeli committed Jul 30, 2022
1 parent abec130 commit e0d37e7
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Deploy gninatorch

on:
release:
types:
- published

defaults:
run:
shell: bash -l {0}


jobs:
build:
if: "github.repository == 'RMeli/gnina-torch'"
name: Build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install Dependencies
shell: bash
run: |
python -m pip install setuptools wheel build twine
- name: Install Package
shell: bash
run: |
python -m pip install .
- name: Build Package
shell: bash
run: |
python -m build
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
path: dist/*.tar.gz
retention-days: 7

testpypi:
if: |
github.repository == 'RMeli/gnina-torch' &&
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/package'))
name: Upload to PyPI
runs-on: ubuntu-latest
needs: build

steps:
- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: artifact
path: dist

- name: Upload Package to TestPyPI
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.TESTPYPI_PWD }}
skip_existing: true
repository_url: https://test.pypi.org/legacy/

0 comments on commit e0d37e7

Please sign in to comment.