Rework release workflows using Github runners (replacing Zig) #57
Workflow file for this run
This file contains hidden or 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: Make ARM Plugins (Windows/macOS/Linux) | |
on: | |
push: | |
paths: | |
- .github/workflows/make-plugin-arm.yml | |
pull_request: | |
paths: | |
- .github/workflows/make-plugin-arm.yml | |
workflow_dispatch: | |
inputs: | |
version_number: | |
description: 'Version number' | |
required: true | |
default: '2.x.x' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: Compute VERSION_NUMBER | |
run: | | |
INPUT_VERSION="${{ github.event.inputs.version_number }}" | |
if [ -n "$INPUT_VERSION" ]; then | |
VERSION="$INPUT_VERSION" | |
else | |
VERSION="$GITHUB_REF_NAME" | |
fi | |
VERSION="${VERSION//\//-}" | |
echo "VERSION_NUMBER=$VERSION" >> "$GITHUB_ENV" | |
echo "Computed VERSION_NUMBER=$VERSION" | |
- name: Setup Zig | |
run: | | |
mkdir -p $HOME/.local/bin $HOME/.local/zig | |
curl -L 'https://ziglang.org/download/0.12.0/zig-linux-x86_64-0.12.0.tar.xz' | tar xJ --strip-components=1 --directory=$HOME/.local/zig | |
ln -sf $HOME/.local/zig/zig $HOME/.local/bin/zig | |
echo "PATH=$PATH:$HOME/.local/bin" >> $GITHUB_ENV | |
- name: Build plugin | |
run: | | |
cd javascript/net/grpc/web/generator | |
VERSION="$VERSION_NUMBER" zig build -Doptimize=ReleaseFast | |
- name: gen and verify sha256 | |
run: | | |
cd javascript/net/grpc/web/generator/zig-out/bin | |
for exe in $(ls); do | |
openssl dgst -sha256 -r -out "${exe}.sha256" "$exe" | |
sha256sum -c "${exe}.sha256" | |
done | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: plugin | |
path: javascript/net/grpc/web/generator/zig-out/bin/ |