mirror of
https://github.com/rustmailer/rustmailer.git
synced 2026-08-20 08:01:10 +00:00
ci: separate protoc install steps for Linux and macOS with correct URLs
This commit is contained in:
@@ -36,23 +36,32 @@ jobs:
|
||||
target: ${{ matrix.target }}
|
||||
override: true
|
||||
|
||||
- name: Install protoc on Linux/macOS
|
||||
if: runner.os != 'Windows'
|
||||
- name: Install protoc on Linux
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
PROTOC_VERSION=21.12
|
||||
OS=$(echo $RUNNER_OS | tr '[:upper:]' '[:lower:]')
|
||||
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-${OS}-x86_64.zip
|
||||
unzip protoc-${PROTOC_VERSION}-${OS}-x86_64.zip -d protoc
|
||||
PROTOC_VERSION=31.1
|
||||
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip
|
||||
unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip -d protoc
|
||||
sudo mv protoc/bin/protoc /usr/local/bin/
|
||||
protoc --version
|
||||
|
||||
- name: Install protoc on macOS
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
PROTOC_VERSION=31.1
|
||||
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-osx-x86_64.zip
|
||||
unzip protoc-${PROTOC_VERSION}-osx-x86_64.zip -d protoc
|
||||
sudo mv protoc/bin/protoc /usr/local/bin/
|
||||
protoc --version
|
||||
|
||||
- name: Install protoc on Windows
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
Invoke-WebRequest -Uri https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-win64.zip -OutFile protoc.zip
|
||||
Invoke-WebRequest -Uri https://github.com/protocolbuffers/protobuf/releases/download/v31.1/protoc-31.1-win64.zip -OutFile protoc.zip
|
||||
Expand-Archive protoc.zip -DestinationPath protoc
|
||||
$Env:PATH += ";${PWD}/protoc/bin"
|
||||
protoc --version
|
||||
|
||||
|
||||
- name: Setup Node.js & pnpm
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user