Skip to content

Bump adm-zip from 0.5.16 to 0.6.0 in /protoc_plugin #101

Bump adm-zip from 0.5.16 to 0.6.0 in /protoc_plugin

Bump adm-zip from 0.5.16 to 0.6.0 in /protoc_plugin #101

Workflow file for this run

name: Build and Test
on: push
permissions:
contents: read
# update in build.yml and codeql.yml at same time
env:
PROTOC_VERSION: "35.1"
jobs:
build:
runs-on: ubuntu-latest
env:
PROTOC: protoc-release/bin/protoc
PROTOC_INC: protoc-release/include
PROTOC_PLATFORM: linux-x86_64
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
node-version: 24
cache: ${{ !env.ACT && 'npm' || '' }} # cache API not available in ACT
- name: Install Protoc
run: |
echo "Fetching protoc"
curl --header 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
-L https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-${PROTOC_PLATFORM}.zip \
--output protoc-release.zip
unzip protoc-release.zip -d protoc-release
rm protoc-release.zip
- run: npm ci
- run: npm test
- run: npm run build
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: js
path: |
google-protobuf.js
google
package:
needs: build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# for now I'm disabling linux building as we don't have the tooling to support it
# os: [ ubuntu-latest ]
# cpu:
# - k8 # this build 'linux-x86_64', is currently working but not useful without the other architectures
# would need some kind of CROSSTOOL chain to build the other architectures
# or we'd have to use the https://github.com/uraimo/run-on-arch-action (which lacks support for x86_32) to build these
# - x86_32
# - systemz
# - aarch64
# - ppc64
include:
# to ensure backwards compatibility as long as possible, use earliest versions of OSs available on Github Actions
- os: windows-2022
cpu: x64_windows
bazel_target: dist_zip
- os: windows-2022
cpu: x64_x86_windows
bazel_target: dist_zip
- os: macos-14
cpu: darwin_arm64
bazel_target: dist_zip
- os: macos-14-large
cpu: darwin_x86_64
bazel_target: dist_zip
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
persist-credentials: false
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
if: ${{ !env.ACT }}
with:
name: js
- uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
- run: mkdir out
# setup-bazelisk fails when running in ACT because the cache is not available so we need to ignore to let the bazel step run
- if: success() || env.ACT && failure()
run: bazel build --cpu=${{ matrix.cpu }} ${{ matrix.bazel_target || 'dist_all' }}
shell: bash
# need to copy to output directory as `bazel-bin` is a symlink and cannot be read by the actions/upload-artifact action
- run: cp bazel-bin/protobuf-javascript-* out/
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: release-${{ matrix.os }}-${{ matrix.cpu }}
path: out