-
Notifications
You must be signed in to change notification settings - Fork 25
45 lines (43 loc) · 1.21 KB
/
build-nmstore.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
45
name: Build PyPi Wheel
on:
pull_requests:
branches:
- main
push:
branches:
- main
- 'release/[0-9]+.[0-9]+'
schedule:
- cron: '0 0 * * *'
env:
INTERNAL: ${{ github.event_name != 'schedule' }}
RELEASE: ${{ github.event_name == 'push' && github.ref == 'refs/heads/release/[0-9]+.[0-9]+' }}
DEV: ${{ github.event_name == 'pull_request' && github.event.action == 'opened' }}
jobs:
build_and_push:
runs-on: ubuntu-latest
outputs:
filename: ${{ steps.build_wheel.outputs.filename }}
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Login to s3
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_WEBIDENTITY_FOR_GITHUB_ACTIONS }}
aws-region: us-east-1
- name: Build PyPi Wheel
id: build_wheel
uses: neuralmagic/nmstore/actions/pypi@pypi-test
with:
dev: $DEV
release: $RELEASE
runs-on: ubuntu-latest
- name: Push to s3 bucket
uses: neuralmagic/nmstore/actions/s3@pypi-test
with:
filename: dist/*.whl
internal: $INTERNAL