-
Notifications
You must be signed in to change notification settings - Fork 1
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
2 changed files
with
35 additions
and
25 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 |
---|---|---|
@@ -1,34 +1,44 @@ | ||
name: Publish tag to Pypi | ||
|
||
name: Publish Pypi | ||
on: | ||
release: | ||
types: [published] | ||
|
||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
types: [ published ] | ||
|
||
jobs: | ||
|
||
build_and_package: | ||
pytest: | ||
name: Publish to PyPi | ||
runs-on: ubuntu-latest | ||
env: | ||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: install python | ||
uses: actions/setup-python@v4 | ||
- uses: actions/checkout@master | ||
|
||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.9 | ||
- name: Install dev tools | ||
run: | | ||
pip install -r dev_requirements.txt | ||
pip install twine wheel | ||
python-version: 3.8 | ||
|
||
- name: Build package | ||
run: | | ||
python setup.py build | ||
python setup.py sdist bdist_wheel | ||
- name: Install Poetry | ||
uses: dschep/[email protected] | ||
|
||
- name: Publish to Pypi | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
- name: Cache Poetry virtualenv | ||
uses: actions/cache@v1 | ||
id: cache | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
path: ~/.virtualenvs | ||
key: poetry-${{ hashFiles('**/poetry.lock') }} | ||
restore-keys: | | ||
poetry-${{ hashFiles('**/poetry.lock') }} | ||
- name: Set Poetry config | ||
run: | | ||
poetry config virtualenvs.in-project false | ||
poetry config virtualenvs.path ~/.virtualenvs | ||
- name: Install Dependencies | ||
run: poetry install | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
|
||
- name: Publish to PyPI | ||
if: github.event_name == 'release' | ||
run: | | ||
poetry publish -u __token__ -p ${{ secrets.PYPI_TOKEN }} --build |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "redisenv" | ||
version = "0.1.1" | ||
version = "0.1.2" | ||
description = "A tool for building redis test environments" | ||
authors = ["Redis OSS <[email protected]>"] | ||
readme = "README.md" | ||
|