Merge pull request #6 from yuchen0cc/main #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Wheel | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
build: | |
name: "Build Release" | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Login ghcr.io | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup buildx instance | |
uses: docker/setup-buildx-action@v2 | |
with: | |
use: true | |
- name: Build | |
shell: bash | |
run: | | |
RELEASE_VERSION=${{ github.ref }} | |
RELEASE_VERSION="${RELEASE_VERSION#refs/tags/v}" | |
echo "RELEASE_VERSION=${RELEASE_VERSION}" | |
PYTHON_VERSION=${{ matrix.python }} | |
PYTHON_VERSION=${PYTHON_VERSION//./} | |
echo "PYTHON_VERSION=${PYTHON_VERSION}" | |
BUILD_IMAGE="quay.io/pypa/manylinux2014_x86_64:2024-03-10-4935fcc" | |
echo "BUILD_IMAGE=${BUILD_IMAGE}" | |
RELEASE_IMAGE="ghcr.io/${GITHUB_REPOSITORY,,}/connector_builder:${RELEASE_VERSION}" | |
echo "RELEASE_IMAGE=${RELEASE_IMAGE}" | |
docker buildx build --build-arg BUILD_IMAGE=${BUILD_IMAGE} --build-arg RELEASE_IMAGE=${RELEASE_IMAGE} --build-arg PYTHON_VERSION=${PYTHON_VERSION} -f .github/workflows/build_wheel/Dockerfile -o dist/ . | |
ls -l dist/ | |
- name: Upload | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: dist/osstorchconnector* | |
release: | |
name: "Tagged Release" | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Download builds and release notes | |
uses: actions/download-artifact@v3 | |
- name: Display downloaded files | |
shell: bash | |
run: | | |
ls -l dist | |
releasever=${{ github.ref }} | |
releasever="${releasever#refs/tags/}" | |
echo "RELEASE_VERSION=${releasever}" >> $GITHUB_ENV | |
- name: Create Release | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "${{ env.RELEASE_VERSION }}" | |
prerelease: false | |
files: dist/osstorchconnector* |