Skip to content

Commit

Permalink
Adding pre-release vs release logic (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
wallentx authored Jun 9, 2023
1 parent 7336ef3 commit 70bb402
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
push:
branches:
- main
tags:
- '**'
release:
types: [published]
pull_request:
branches:
- '**'
Expand Down Expand Up @@ -45,25 +45,25 @@ jobs:
cibw-build: 'cp37-*'
manylinux:
arch: manylinux2014
intel: manylinux2010
intel: manylinux2014
matrix: '3.7'
- major-dot-minor: '3.8'
cibw-build: 'cp38-*'
manylinux:
arch: manylinux2014
intel: manylinux2010
intel: manylinux2014
matrix: '3.8'
- major-dot-minor: '3.9'
cibw-build: 'cp39-*'
manylinux:
arch: manylinux2014
intel: manylinux2010
intel: manylinux2014
matrix: '3.9'
- major-dot-minor: '3.10'
cibw-build: 'cp310-*'
manylinux:
arch: manylinux2014
intel: manylinux2010
intel: manylinux2014
matrix: '3.10'
- major-dot-minor: '3.11'
cibw-build: 'cp311-*'
Expand Down Expand Up @@ -112,6 +112,12 @@ jobs:
with:
fetch-depth: 0

- name: Set Env
if: env.RUNNER_ARCH != 'ARM64'
uses: Chia-Network/actions/setjobenv@main
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: chia-network/actions/setup-python@main
with:
python-version: ${{ matrix.python.major-dot-minor }}
Expand All @@ -136,9 +142,6 @@ jobs:
&& echo "epel-release installed"
&& yum -y install lzip
&& echo "lzip installed"
&& curl -L https://github.com/Kitware/CMake/releases/download/v3.17.3/cmake-3.17.3-Linux-`uname -m`.sh > cmake.sh
&& yes | sh cmake.sh | cat
&& rm -f /usr/bin/cmake
&& curl -L https://gmplib.org/download/gmp/gmp-6.2.1.tar.lz | tar x --lzip
&& cp contrib/gmp-patch-6.2.1/longlong.h gmp-6.2.1/
&& cp contrib/gmp-patch-6.2.1/compat.c gmp-6.2.1/
Expand Down Expand Up @@ -286,6 +289,11 @@ jobs:
with:
fetch-depth: 0

- name: Set Env
uses: Chia-Network/actions/setjobenv@main
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: Chia-Network/actions/setup-python@main
with:
python-version: ${{ matrix.python.major-dot-minor }}
Expand All @@ -310,15 +318,15 @@ jobs:
run: pip install twine

- name: Publish distribution to PyPI
if: startsWith(github.event.ref, 'refs/tags') && steps.check_secrets.outputs.HAS_SECRET
if: env.RELEASE == 'true' && steps.check_secrets.outputs.HAS_SECRET
env:
TWINE_USERNAME: __token__
TWINE_NON_INTERACTIVE: 1
TWINE_PASSWORD: ${{ secrets.pypi_password }}
run: twine upload --non-interactive --skip-existing --verbose 'dist/*'

- name: Publish distribution to Test PyPI
if: steps.check_secrets.outputs.HAS_SECRET
if: env.PRE_RELEASE == 'true' && steps.check_secrets.outputs.HAS_SECRET
env:
TWINE_REPOSITORY_URL: https://test.pypi.org/legacy/
TWINE_USERNAME: __token__
Expand Down
Empty file modified .github/workflows/stale-issue.yml
100755 → 100644
Empty file.

0 comments on commit 70bb402

Please sign in to comment.