Skip to content

Commit

Permalink
Merge pull request #8 from domonik/new-dev
Browse files Browse the repository at this point in the history
New dev
  • Loading branch information
domonik authored Nov 19, 2024
2 parents 6238234 + 8387193 commit 23056ef
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 2 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/build-pypi-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Publish Python distribution to PyPI and TestPyPI

on:
push:
tags:
- "v*.*.*"

jobs:
build:
name: Build distribution πŸ“¦
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a source tarball
run: python3 setup.py sdist
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: >-
Publish Python 🐍 distribution πŸ“¦ to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/RNAdist # Replace <package-name> with your PyPI project name
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution πŸ“¦ to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

publish-to-testpypi:
name: Publish Python 🐍 distribution πŸ“¦ to TestPyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest

environment:
name: testpypi
url: https://test.pypi.org/p/RNAdist

permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution πŸ“¦ to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
RNAdist is a package to approximate expected distances on RNA
structures.

## [Getting Started](https://domonik.github.io/RAPDOR/)
## [Getting Started](https://domonik.github.io/RNAdist/)

For installation details, documentation and various tutorials please have a look at our documentation page here:

https://domonik.github.io/RAPDOR/
https://domonik.github.io/RNAdist/

0 comments on commit 23056ef

Please sign in to comment.