Skip to content

Commit

Permalink
Add release workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
agahkarakuzu committed Jul 24, 2024
1 parent b47b92c commit 49b398e
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/test_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish Python 🐍 distribution to TestPyPI
on: push

jobs:
pypi-test-publish:
name: upload release to TestPyPI
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: test_release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10.4'
cache: pip
cache-dependency-path: '**/pyproject.toml'
- name: Install dependencies
run: |
pip install setuptools wheel build twine setuptools_scm
- name: Build
run: |
python -m build
# retrieve your distributions here
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
32 changes: 32 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: publish
on:
push:
tags:
- 'v*.*.*'

jobs:
pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10.4'
cache: pip
cache-dependency-path: '**/pyproject.toml'
- name: Install dependencies
run: |
pip install setuptools wheel build twine setuptools_scm
- name: Build
run: |
python -m build
# retrieve your distributions here
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ tests/in/neurolibre/data

# Build dir
/build/

.DS_Store
41 changes: 41 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"

[project]
name = "repo2data"
dynamic = ["version"]
description = "A Python package to automate the fetching and extraction of data from remote sources like Amazon S3, Zeonodo, Datalad, Google Drive, OSF, or any public download URL."
authors = [
{ name="ltetrel", email="[email protected]" },
{ name="agahkarakuzu", email="[email protected]" }
]
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.7"
keywords = ["neurolibre", "open-data", "reproducible", "osf", "zenodo","datalad","conp","gdown","aws"]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
'awscli',
'patool',
'datalad',
'requests',
'osfclient',
'gdown',
'zenodo-get',
'requests'
]

[project.scripts]
repo2data = "bin/repo2data:main"

[project.urls]
Homepage = "https://github.com/SIMEXP/Repo2Data"

[tool.setuptools_scm]
version_scheme = "post-release"
local_scheme = "dirty-tag"

0 comments on commit 49b398e

Please sign in to comment.