diff --git a/.github/workflows/kernel.yml b/.github/workflows/kernel.yml deleted file mode 100644 index 32c18fe3..00000000 --- a/.github/workflows/kernel.yml +++ /dev/null @@ -1,48 +0,0 @@ -on: - workflow_dispatch: - pull_request: - paths: - - kernel/** - -name: Kernel - -jobs: - kernel: - name: Build extism-runtime.wasm - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - target: wasm32-unknown-unknown - - uses: Swatinem/rust-cache@v2 - - - name: Install deps - run: | - sudo apt install wabt --yes - - - name: Build kernel - shell: bash - continue-on-error: true - run: | - cd kernel - sh build.sh - git diff --exit-code - export GIT_EXIT_CODE=$? - - - uses: peter-evans/create-pull-request@v5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: ${{ env.GIT_EXIT_CODE }} != 0 - with: - author: "zshipko " - title: "update(kernel): extism-runtime.wasm in ${{ github.event.pull_request.head.ref }}" - body: "Automated PR to update `runtime/src/extism-runtime.wasm` in PR #${{ github.event.number }}" - base: "${{ github.event.pull_request.head.ref }}" - branch: "update-kernel--${{ github.event.pull_request.head.ref }}" - commit-message: "update(kernel): extism-runtime.wasm in ${{ github.event.pull_request.head.ref }}" - delete-branch: true diff --git a/.github/workflows/release-dotnet-native.yaml b/.github/workflows/release-dotnet-native.yaml deleted file mode 100644 index 15599bf5..00000000 --- a/.github/workflows/release-dotnet-native.yaml +++ /dev/null @@ -1,70 +0,0 @@ -on: - workflow_dispatch: - -name: Release .NET Native NuGet Packages - -jobs: - release-runtimes: - name: release-dotnet-native - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - filter: tree:0 - - - name: Setup .NET Core SDK - uses: actions/setup-dotnet@v3.0.3 - with: - dotnet-version: 7.x - - uses: dawidd6/action-download-artifact@v2 - with: - workflow: release.yml - name: release-artifacts - - name: Extract Archive - run: | - extract_archive() { - # Check if both pattern and destination are provided - if [ -z "$1" ] || [ -z "$2" ]; then - echo "Usage: $0 " - return 1 - fi - - # Set the filename pattern and destination directory - filename_pattern="$1" - destination_directory="$2" - - # Find the archive file with the specified pattern - archive_file=$(ls $filename_pattern 2>/dev/null) - - # Check if an archive file is found - if [ -n "$archive_file" ]; then - echo "Found archive file: $archive_file" - - # Create the destination directory if it doesn't exist - mkdir -p "$destination_directory" - - # Extract the archive to the specified destination - tar -xzvf "$archive_file" -C "$destination_directory" - - echo "Extraction complete. Contents placed in: $destination_directory" - else - echo "No matching archive file found with the pattern: $filename_pattern" - fi - } - - extract_archive "libextism-x86_64-pc-windows-msvc-*.tar.gz" "nuget/runtimes/win-x64/native/" - extract_archive "libextism-aarch64-apple-darwin-*.tar.gz" "nuget/runtimes/osx-arm64/native/" - extract_archive "libextism-x86_64-apple-darwin-*.tar.gz" "nuget/runtimes/osx-x64/native/" - extract_archive "libextism-x86_64-unknown-linux-gnu-*.tar.gz" "nuget/runtimes/linux-x64/native/" - extract_archive "libextism-aarch64-unknown-linux-gnu-*.tar.gz" "nuget/runtimes/linux-arm64/native/" - extract_archive "libextism-aarch64-unknown-linux-musl-*.tar.gz" "nuget/runtimes/linux-musl-arm64/native/" - - - name: Pack NuGet packages - run: | - find ./nuget -type f -name "*.csproj" -exec dotnet pack {} -o release-artifacts \; - - - name: Publish NuGet packages - run: | - dotnet nuget push --source https://api.nuget.org/v3/index.json ./release-artifacts/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} diff --git a/.github/workflows/release-python.yaml b/.github/workflows/release-python.yaml deleted file mode 100644 index 7006d44f..00000000 --- a/.github/workflows/release-python.yaml +++ /dev/null @@ -1,41 +0,0 @@ -name: Release Python SDK - -on: - release: - types: [published, edited] - -jobs: - release-sdks: - name: release-python - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install poetry - run: pipx install poetry - - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - - name: install twine - run: | - pip install twine - - - name: download release - run: | - tag='${{ github.ref }}' - tag="${tag/refs\/tags\//}" - mkdir dist - cd dist - gh release download "$tag" -p 'extism_sys-*' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: upload release - run: | - twine upload dist/* - env: - TWINE_USERNAME: ${{ secrets.PYPI_API_USER }} - TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/release-rust.yaml b/.github/workflows/release-rust.yaml deleted file mode 100644 index 94517f7d..00000000 --- a/.github/workflows/release-rust.yaml +++ /dev/null @@ -1,73 +0,0 @@ -on: - release: - types: [published, edited] - workflow_dispatch: - -name: Release Runtime/Rust SDK - -jobs: - release-runtime: - name: release-rust - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - ref: '${{ github.ref }}' - - - name: Set version - shell: bash - run: | - version="${{ github.ref }}" - if [[ "$version" = "refs/heads/main" ]]; then - version="0.0.0-dev" - else - version="${version/refs\/tags\/v/}" - fi - sed -i -e "s/0.0.0+replaced-by-ci/${version}/g" Cargo.toml - pyproject="$(cat extism-maturin/pyproject.toml)" - <<<"$pyproject" >extism-maturin/pyproject.toml sed -e 's/^version = "0.0.0.replaced-by-ci"/version = "'"$version"'"/g' - - - name: Setup Rust env - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true - target: ${{ matrix.target }} - - - name: Release Rust Convert Crate - env: - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_API_TOKEN }} - run: | - version=$(cargo metadata --format-version=1 | jq -r '.packages[] | select(.name == "extism") | .version') - - if ! &>/dev/null curl -sLIf https://crates.io/api/v1/crates/extism-convert/${version}/download; then - cargo publish --manifest-path convert/Cargo.toml --allow-dirty - else - echo "already published ${version}" - fi - - - name: Release Rust Manifest Crate - env: - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_API_TOKEN }} - run: | - version=$(cargo metadata --format-version=1 | jq -r '.packages[] | select(.name == "extism") | .version') - - if ! &>/dev/null curl -sLIf https://crates.io/api/v1/crates/extism-manifest/${version}/download; then - cargo publish --manifest-path manifest/Cargo.toml --allow-dirty - else - echo "already published ${version}" - fi - - - name: Release Runtime - env: - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_API_TOKEN }} - run: | - version=$(cargo metadata --format-version=1 | jq -r '.packages[] | select(.name == "extism") | .version') - - if ! &>/dev/null curl -sLIf https://crates.io/api/v1/crates/extism/${version}/download; then - cargo publish --manifest-path runtime/Cargo.toml --allow-dirty - else - echo "already published ${version}" - fi