Skip to content

chore(bash): update script per shellcheck recs (#28) #27

chore(bash): update script per shellcheck recs (#28)

chore(bash): update script per shellcheck recs (#28) #27

Workflow file for this run

name: Release and Publish
on:
push:
branches: [ main ]
tags: [ 'v[0-9]+.[0-9]+.[0-9]+' ]
permissions:
contents: write
jobs:
build:
name: Build
runs-on: ubuntu-latest
if: ${{ github.repository == 'substrait-io/substrait-python' }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install build dependencies
run: |
python -m pip install build --user
- name: Build package
run: |
python -m build
- name: Upload package
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/
retention-days: 1
release:
name: Release to GitHub
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- name: Publish to GitHub release page
uses: softprops/action-gh-release@v1
with:
files: |
./dist/*.whl
./dist/*.tar.gz
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
needs: release
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}