Attempt to automate releases

This commit is contained in:
Charlie Marsh 2022-08-27 21:15:23 -04:00
parent ecf1633a14
commit df95473416
1 changed files with 33 additions and 0 deletions

33
.github/workflows/release.yaml vendored Normal file
View File

@ -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 }}