Skip to content

Back to work

Back to work #34

Workflow file for this run

name: Build
on:
push: {}
pull_request: {}
release:
types: [ published ]
jobs:
build-and-test:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Cache build dependencies
uses: actions/cache@v4
env:
cache-name: cache-build-deps
with:
key: ${{ runner.os }}-build-${{ env.cache-name }}
path: |
.cache
duckling-ffi/.stack-work
- name: Run build script
run: |
./build.sh
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: wheels
path: |
target/wheels/*.tar.gz
target/wheels/*.whl
publish:
needs: build-and-test
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- name: Download wheels
uses: actions/download-artifact@v4
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: wheels/
password: ${{ secrets.PYPI_API_TOKEN }}