Skip to content

Ds workflows

Ds workflows #52

Workflow file for this run

name: Build PyPi Wheel
on:
pull_request:
branches:
- main
push:
branches:
- main
- 'release/[0-9]+.[0-9]+'
schedule:
- cron: '0 0 * * *'
# if not dev or release, will create a nightly build
# everything is pushed to internal unless created through a nightly scheduled cron job
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' || github.event.action == 'synchronize')}}
NAME: ${{ github.event.number }}
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
name: $NAME
- name: Push to s3 bucket
uses: neuralmagic/nmstore/actions/s3@pypi-test
with:
filename: dist/*.whl
internal: $INTERNAL