Release #49
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: Release | |
on: | |
push: | |
tags: | |
- v* | |
workflow_dispatch: | |
inputs: {} | |
env: | |
CIBW_BUILD: "c39-* cp310-* cp311-* cp312-*" | |
jobs: | |
Build-Linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # ratchet:actions/[email protected] | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # ratchet:docker/setup-qemu-action@v2 | |
with: | |
platforms: arm64 | |
- name: Build wheels | |
uses: pypa/cibuildwheel@fff9ec32ed25a9c576750c91e06b410ed0c15db7 # ratchet:pypa/[email protected] | |
env: | |
CIBW_ENVIRONMENT: PATH=$(pwd)/go/bin:$PATH | |
CIBW_BEFORE_ALL: sh ci-setup-golang.sh | |
CIBW_SKIP: "*musllinux*" | |
CIBW_ARCHS: "x86_64 aarch64" | |
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # ratchet:actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: ./wheelhouse/*.whl | |
Build-MacOS: | |
strategy: | |
matrix: | |
include: | |
- cibw_arch: "x86_64" | |
go_arch: "amd64" | |
- cibw_arch: "arm64" | |
go_arch: "arm64" | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # ratchet:actions/[email protected] | |
- name: Set up Go | |
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # ratchet:actions/setup-go@v3 | |
with: | |
go-version: "1.19" | |
cache: true | |
cache-dependency-path: "gotfparse/go.sum" | |
- name: Build wheels | |
uses: pypa/cibuildwheel@fff9ec32ed25a9c576750c91e06b410ed0c15db7 # ratchet:pypa/[email protected] | |
env: | |
CGO_ENABLED: 1 | |
CIBW_ARCHS: ${{ matrix.cibw_arch }} | |
GOARCH: ${{ matrix.go_arch }} | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # ratchet:actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: ./wheelhouse/*.whl | |
Upload: | |
needs: [Build-Linux, Build-MacOS] | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # ratchet:actions/[email protected] | |
with: | |
name: wheels | |
path: dist | |
- name: Display downloaded artifacts | |
run: ls -lh dist | |
- uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf # ratchet:pypa/[email protected] | |
with: | |
password: ${{ secrets.PYPI_TOKEN }} |