Rework release workflows using Github runners (replacing Zig) #46
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 Linux Plugin | |
on: | |
push: | |
paths: | |
- .github/workflows/make-plugin-linux.yml | |
pull_request: | |
paths: | |
- .github/workflows/make-plugin-linux.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 | |
- 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: Install Bazelisk (Bazel) | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y unzip zip | |
sudo curl -L -o /usr/local/bin/bazelisk \ | |
https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 | |
sudo chmod +x /usr/local/bin/bazelisk | |
# Also provide `bazel` symlink for tools that expect it | |
sudo ln -sf /usr/local/bin/bazelisk /usr/local/bin/bazel | |
- name: Print Bazel version | |
run: bazelisk version | |
- name: Build protoc-gen-grpc-web with Bazel | |
run: | | |
bazelisk build //javascript/net/grpc/web/generator:protoc-gen-grpc-web | |
- name: Move artifact | |
run: | | |
mv bazel-bin/javascript/net/grpc/web/generator/protoc-gen-grpc-web \ | |
./protoc-gen-grpc-web-${VERSION_NUMBER}-linux-x86_64 | |
- name: gen sha256 | |
run: | | |
openssl dgst -sha256 -r -out protoc-gen-grpc-web-${VERSION_NUMBER}-linux-x86_64.sha256 \ | |
protoc-gen-grpc-web-${VERSION_NUMBER}-linux-x86_64 | |
- name: verify sha256 | |
run: sha256sum -c protoc-gen-grpc-web-${VERSION_NUMBER}-linux-x86_64.sha256 | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: plugin | |
path: protoc-gen-grpc-web* |