-
Notifications
You must be signed in to change notification settings - Fork 145
67 lines (61 loc) · 1.59 KB
/
build-wheel.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Build Wheel and Push to s3
on:
workflow_call:
inputs:
build-label:
description: "requested runner label"
type: string
required: true
dev:
type: string
required: true
release:
type: string
required: true
name:
type: string
filename:
type: string
required: true
bucket_name:
type: string
required: true
python:
type: string
outputs:
wheel:
value: ${{ jobs.build-wheel-and-push.outputs.wheel }}
jobs:
build-wheel-and-push:
runs-on: ${{ inputs.build-label }}
outputs:
wheel: ${{ steps.push-wheel.outputs.wheel }}
steps:
- uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python }}
- 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: Set Env
run: |
pip3 install virtualenv
virtualenv venv
source venv/bin/activate
- name: Build PyPi Wheel
id: build-wheel
uses: neuralmagic/nm-actions/actions/pypi_build@main
with:
dev: ${{ inputs.dev }}
release: ${{ inputs.release }}
name: ${{ inputs.name }}
- name: Push to s3 bucket
id: push-wheel
uses: neuralmagic/nm-actions/actions/s3_push@main
with:
filename: ${{ inputs.filename }}
bucket_name: ${{ inputs.bucket_name }}