forked from treble-ai/pyduckling
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (44 loc) · 1.23 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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 }}