Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/hkk97/rust_x3dh
Browse files Browse the repository at this point in the history
  • Loading branch information
wchklaus97 committed Mar 2, 2024
2 parents ed93e53 + 0ec65da commit 5f88c45
Showing 1 changed file with 17 additions and 49 deletions.
66 changes: 17 additions & 49 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,6 @@ on:
- '*'

jobs:
sdist:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
env:
RUST_TOOLCHAIN: "1.72" # MSRV
steps:
- run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain $RUST_TOOLCHAIN -y
- run: rustup default $RUST_TOOLCHAIN

- uses: actions/checkout@v4

- run: python3 -m pip install --user --upgrade pip "maturin>=1,<2" wheel

- run: maturin build
- run: cargo fetch
- run: mkdir .cargo

- run: maturin sdist --out=dist

- run: python3 -m pip install --user dist/rust_x3dh*.tar.gz
env:
CARGO_NET_OFFLINE: "true"

- name: Store sdist
if: "startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
retention-days: 1

musllinux_1_2:
runs-on: ubuntu-22.04
strategy:
Expand Down Expand Up @@ -98,24 +66,24 @@ jobs:
contents: write
runs-on: ubuntu-22.04
if: "startsWith(github.ref, 'refs/tags/')"
needs: [musllinux_1_2, sdist]
needs: [musllinux_1_2]
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
- uses: actions/download-artifact@v3
with:
name: wheels
- uses: actions/setup-python@v2
with:
python-version: "3.9"

- name: Install dependencies
run: python -m pip install --upgrade pip setuptools wheel twine

- name: Build package
run: python setup.py sdist bdist_wheel

- name: Publish to PyPI
- run: pip install "maturin>=1,<2"
- run: maturin publish --skip-existing --username "${{ secrets.PYPI_USER_NAME }}" wheel
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
- run: maturin publish --skip-existing --username "${{ secrets.PYPI_USER_NAME }}" --target python${{ matrix.python.version }}
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
- run: maturin upload --skip-existing --username "${{ secrets.PYPI_USER_NAME }}" wheel
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
- run: maturin upload --skip-existing --username "${{ secrets.PYPI_USER_NAME }}" --target python${{ matrix.python.version }}
env:
TWINE_USERNAME: ${{ secrets.PYPI_USER_NAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload --skip-existing dist/*
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

0 comments on commit 5f88c45

Please sign in to comment.