wip #1
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: Python CD | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
branches: | ||
- 'chris/20230919-python-cd' | ||
jobs: | ||
release: | ||
name: release | ||
runs-on: ubuntu-latest | ||
outputs: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
extism_version: ${{ steps.find_latest_extism_release.outputs.tag }} | ||
steps: | ||
- name: create a github release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Extism Python SDK ${{ github.ref }} | ||
draft: true | ||
prerelease: false | ||
- name: find latest extism release | ||
id: find_latest_extism_release | ||
run: | | ||
tag=$( | ||
curl -H 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ | ||
-sL 'https://api.github.com/repos/extism/extism/releases/latest' | | ||
jq .tag_name | ||
) | ||
echo "tag=$tag" >> "$GITHUB_OUTPUT" | ||
linux: | ||
runs-on: ubuntu-latest | ||
needs: [release] | ||
strategy: | ||
matrix: | ||
target: [x86_64, aarch64] | ||
steps: | ||
- name: download extism development release | ||
run: | | ||
Check failure on line 45 in .github/workflows/build.yaml GitHub Actions / Python CDInvalid workflow file
|
||
set -eou pipefail | ||
arch="$(<<<'${{ runner.arch }}' sed -e 's/ARM64/aarch64/g')" | ||
arch="${arch/X64/x86_64}" | ||
os="$(<<<'${{ runner.os }}' tr '[:upper:]' '[:lower:]')" | ||
os="${os/macos/darwin}" | ||
echo "attempting to download 'libextism-${arch}-${os}-*.tar.gz'" | ||
gh release -R extism/extism download ${{ jobs.release.outputs.extism_version }} -p "libextism-${arch}-*${os}-*.tar.gz" | ||
tar zxfv *.tar.gz | ||
sudo mv libextism.* /usr/local/lib/ | ||
sudo mv extism.h /usr/local/include/ | ||
env: | ||
GH_TOKEN: ${{ github.token }} |