53 lines
1.7 KiB
YAML
53 lines
1.7 KiB
YAML
name: release
|
|
on:
|
|
push:
|
|
tags:
|
|
- "*"
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/checkout@v4
|
|
- name: Setup Python
|
|
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # ratchet:actions/setup-python@v5
|
|
with:
|
|
python-version-file: .python-version-default
|
|
- name: Build
|
|
run: pipx run build
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # ratchet:actions/upload-artifact@v4
|
|
with:
|
|
name: python-artefacts-openllm
|
|
path: dist/*
|
|
if-no-files-found: error
|
|
release:
|
|
if: github.repository_owner == 'bentoml'
|
|
needs:
|
|
- build
|
|
runs-on: ubuntu-latest
|
|
name: Release
|
|
permissions:
|
|
id-token: write
|
|
contents: write
|
|
steps:
|
|
- name: Download Python artifacts
|
|
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # ratchet:actions/download-artifact@v4
|
|
with:
|
|
pattern: python-artefacts-*
|
|
merge-multiple: true
|
|
path: dist
|
|
- name: dry ls
|
|
run: ls -rthlaR
|
|
- name: Publish to PyPI
|
|
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # ratchet:pypa/gh-action-pypi-publish@release/v1
|
|
with:
|
|
print-hash: true
|
|
- name: Create release
|
|
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836 # ratchet:softprops/action-gh-release@v2
|
|
with:
|
|
# Use GH feature to populate the changelog automatically
|
|
generate_release_notes: true
|
|
fail_on_unmatched_files: true
|
|
files: |-
|
|
dist/*
|