Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Commit

Permalink
Forgot to save
Browse files Browse the repository at this point in the history
	modified:   .github/workflows/release.yml
  • Loading branch information
vicky5124 committed Nov 7, 2021
1 parent 2b8af4b commit 31fc2df
Showing 1 changed file with 6 additions and 104 deletions.
110 changes: 6 additions & 104 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,104 +5,6 @@ on:
tags:
- "*"

jobs:
publish-posix:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]
os: [ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Build Python package
run: poetry run maturin build --release --no-sdist --strip --interpreter python${{matrix.python-version}}

- name: List wheels
run: find ./target/wheels/

- name: Install wheels
run: pip install target/wheels/lavasnek_rs*.whl

- name: Release
uses: softprops/action-gh-release@v1
with:
files: target/wheels/lavasnek_rs*.whl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: PyPi publish
env:
MATURIN_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: poetry run maturin publish --no-sdist --interpreter python${{matrix.python-version}} --username __token__

publish-windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]

steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Build Python package (win)
run: poetry run maturin build --release --no-sdist --strip --interpreter python

- name: List wheels (win)
run: dir target\wheels\

# Note: Windows doesn't support glob
# https://stackoverflow.com/a/52481267/270334
- name: Install wheels (win)
run: pip install --find-links=target\wheels lavasnek_rs

- name: Release
uses: softprops/action-gh-release@v1
with:
files: target/wheels/lavasnek_rs*.whl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: PyPi publish (win)
env:
MATURIN_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: poetry run maturin publish --no-sdist --interpreter python --username __token__

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }} - ${{ matrix.vers }}
Expand All @@ -126,7 +28,7 @@ jobs:

env:
SCCACHE_VERSION: 0.2.13
CIBW_BEFORE_ALL_LINUX: "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y
CIBW_BEFORE_ALL_LINUX: "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y"
CIBW_BUILD_VERBOSITY: "1" # Make some more noise to not stall, and extra debugging.
CIBW_ENVIRONMENT: 'PATH="$PATH:$HOME/.cargo/bin"'
CIBW_SKIP: "cp27-* cp34-* cp35-* pp* *-win32"
Expand Down Expand Up @@ -187,7 +89,7 @@ jobs:
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: "3.10"
python-version: "3.8"

- name: Build sdist
run: |
Expand All @@ -212,7 +114,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
# - uses: pypa/gh-action-pypi-publish@master
# wiusth:
# ususer: __token__
# uspassword: ${{ secrets.PYPI_TOKEN }}

0 comments on commit 31fc2df

Please sign in to comment.