-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
106 additions
and
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,58 +5,67 @@ name: release | |
# and the pre-commit and tests pass | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+*" | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+*' | ||
|
||
jobs: | ||
|
||
check-release-tag: | ||
|
||
# Only run this job on the main repository and not on forks | ||
if: github.repository == 'aiidateam/disk-objectstore' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- run: python .github/workflows/check_release_tag.py $GITHUB_REF disk_objectstore/__init__.py | ||
|
||
pre-commit: | ||
|
||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- uses: pre-commit/[email protected] | ||
|
||
publish: | ||
|
||
name: Publish to PyPI | ||
needs: [check-release-tag, pre-commit] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v2 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Build package | ||
run: | | ||
pip install wheel | ||
python setup.py sdist bdist_wheel | ||
- name: Publish to PyPI | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_KEY }} | ||
check-release-tag: | ||
|
||
if: github.repository == 'aiidateam/disk-objectstore' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Python 3.8 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: Validate the tag version against the package version | ||
run: python .github/workflows/check_release_tag.py $GITHUB_REF disk_objectstore/__init__.py | ||
|
||
pre-commit: | ||
|
||
needs: [check-release-tag] | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
cache: 'pip' | ||
cache-dependency-path: pyproject.toml | ||
|
||
- uses: pre-commit/[email protected] | ||
|
||
publish: | ||
|
||
name: Publish to PyPI | ||
needs: [check-release-tag, pre-commit] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Python 3.8 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: Install flit | ||
run: pip install flit~=3.4 | ||
|
||
- name: Build and publish | ||
run: flit publish | ||
env: | ||
FLIT_USERNAME: __token__ | ||
FLIT_PASSWORD: ${{ secrets.PYPI_KEY }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,4 @@ | |
|
||
__all__ = ("Container", "ObjectType", "CompressMode") | ||
|
||
__version__ = "0.6.0" | ||
__version__ = "1.0.0" |