mirror of https://github.com/astral-sh/ruff
Attempt to automate releases
This commit is contained in:
parent
ecf1633a14
commit
df95473416
|
|
@ -0,0 +1,33 @@
|
||||||
|
name: Upload Python Package
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [ created ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
- uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.10'
|
||||||
|
- run: pip install maturin
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
env:
|
||||||
|
cache-name: cache-cargo
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/registry
|
||||||
|
~/.cargo/git
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||||
|
${{ runner.os }}-build-
|
||||||
|
${{ runner.os }}-
|
||||||
|
- name: Build and publish
|
||||||
|
run: |
|
||||||
|
maturin publish --skip-existing --username __token__ --password ${{ secrets.PYPI_PASSWORD }}
|
||||||
Loading…
Reference in New Issue