adopt upload/download breaking changes in Py wheel build on release publish

This commit is contained in:
Kenneth Bingham 2024-06-26 17:27:42 -04:00
parent bac0eecb95
commit cf7f8d5e54
No known key found for this signature in database
GPG Key ID: 31709281860130B6
4 changed files with 21 additions and 18 deletions

View File

@ -25,7 +25,7 @@ jobs:
fetch-depth: 0 fetch-depth: 0
- name: Setup Python - name: Setup Python
uses: actions/setup-python@v3 uses: actions/setup-python@v5
with: with:
python-version: '3.x' python-version: '3.x'
@ -42,7 +42,7 @@ jobs:
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
if: startsWith(matrix.spec.name, 'linux') if: startsWith(matrix.spec.name, 'linux')
with: with:
name: zrok_sdk name: zrok_sdk_${{ matrix.spec.target }}
path: ${{ github.workspace }}/sdk/python/sdk/zrok/dist/* path: ${{ github.workspace }}/sdk/python/sdk/zrok/dist/*
publish: publish:
@ -52,15 +52,17 @@ jobs:
id-token: write id-token: write
steps: steps:
- name: Download artifacts - name: Download artifacts
uses: actions/download-artifact@v3 uses: actions/download-artifact@v4
with: with:
path: download path: ./download
merge-multiple: true
pattern: zrok_sdk_*
- name: check - name: check
run: | run: |
ls -lR download ls -lR ./download/
mkdir dist mkdir dist
cp download/*/* dist cp ./download/*/* ./dist/
- name: Publish wheels (TestPYPI) - name: Publish wheels (TestPYPI)
uses: pypa/gh-action-pypi-publish@release/v1 uses: pypa/gh-action-pypi-publish@release/v1

View File

@ -95,22 +95,22 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Download Branch Build Artifact - name: Download Branch Build Artifact
uses: actions/download-artifact@v3 uses: actions/download-artifact@v4
with: with:
name: linux-amd64 name: linux-amd64
path: ./dist/amd64/linux/ path: ./dist/amd64/linux/
- name: Set Up QEMU - name: Set Up QEMU
uses: docker/setup-qemu-action@v2 uses: docker/setup-qemu-action@v3
with: with:
platforms: amd64,arm64 platforms: amd64,arm64
- name: Set Up Docker BuildKit - name: Set Up Docker BuildKit
id: buildx id: buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub - name: Login to Docker Hub
uses: docker/login-action@v2 uses: docker/login-action@v3
with: with:
username: ${{ vars.DOCKER_HUB_API_USER || secrets.DOCKER_HUB_API_USER }} username: ${{ vars.DOCKER_HUB_API_USER || secrets.DOCKER_HUB_API_USER }}
password: ${{ secrets.DOCKER_HUB_API_TOKEN }} password: ${{ secrets.DOCKER_HUB_API_TOKEN }}

View File

@ -49,7 +49,7 @@ jobs:
- name: Setup .npmrc - name: Setup .npmrc
if: github.ref_type == 'tag' if: github.ref_type == 'tag'
# Setup .npmrc file to prepare for possible publish to npm # Setup .npmrc file to prepare for possible publish to npm
uses: actions/setup-node@v1 uses: actions/setup-node@v4
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org' registry-url: 'https://registry.npmjs.org'

View File

@ -39,20 +39,20 @@ jobs:
uses: dsaltares/fetch-gh-release-asset@1.1.2 uses: dsaltares/fetch-gh-release-asset@1.1.2
with: with:
version: tags/v${{ steps.semver.outputs.zrok_semver }} version: tags/v${{ steps.semver.outputs.zrok_semver }}
file: zrok*_${{ steps.semver.outputs.zrok_semver }}_linux_amd64.tar.gz file: zrok*_linux_amd64.tar.gz
target: dist/amd64/linux/zrok_${{ steps.semver.outputs.zrok_semver }}_linux_amd64.tar.gz target: dist/amd64/linux/zrok_linux_amd64.tar.gz
- name: Download Linux ARM64 Release Artifact - name: Download Linux ARM64 Release Artifact
uses: dsaltares/fetch-gh-release-asset@1.1.2 uses: dsaltares/fetch-gh-release-asset@1.1.2
with: with:
version: tags/v${{ steps.semver.outputs.zrok_semver }} version: tags/v${{ steps.semver.outputs.zrok_semver }}
file: zrok*_${{ steps.semver.outputs.zrok_semver }}_linux_arm64.tar.gz file: zrok*_linux_arm64.tar.gz
target: dist/arm64/linux/zrok_${{ steps.semver.outputs.zrok_semver }}_linux_arm64.tar.gz target: dist/arm64/linux/zrok_linux_arm64.tar.gz
- name: Unpack the Release Artifacts - name: Unpack the Release Artifacts
run: | run: |
for TGZ in dist/{amd,arm}64/linux; do for TGZ in dist/{amd,arm}64/linux; do
tar -xvzf ${TGZ}/zrok_*.tar.gz -C ${TGZ} tar -xvzf ${TGZ}/*.tar.gz -C ${TGZ}
done done
- name: Set Up QEMU - name: Set Up QEMU
@ -76,8 +76,9 @@ jobs:
ZROK_CONTAINER_IMAGE_TAG: ${{ steps.semver.outputs.zrok_semver }} ZROK_CONTAINER_IMAGE_TAG: ${{ steps.semver.outputs.zrok_semver }}
id: tagprep_cli id: tagprep_cli
run: | run: |
echo DOCKER_TAGS="${ZROK_CONTAINER_IMAGE_REPO}:${ZROK_CONTAINER_IMAGE_TAG},${ZROK_CONTAINER_IMAGE_REPO}:latest" \ DOCKER_TAGS="${ZROK_CONTAINER_IMAGE_REPO}:${ZROK_CONTAINER_IMAGE_TAG}"
| tee -a $GITHUB_OUTPUT DOCKER_TAGS+=",${ZROK_CONTAINER_IMAGE_REPO}:latest"
echo "DOCKER_TAGS=${DOCKER_TAGS}" | tee -a $GITHUB_OUTPUT
# this is the CLI image with the Linux binary for each # this is the CLI image with the Linux binary for each
# arch that was downloaded in ./dist/ # arch that was downloaded in ./dist/