chore(deps): update dependency com_google_protobuf to v25 #31
Workflow file for this run
This file contains 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: assets | ||
on: | ||
release: | ||
types: | ||
- created | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: 'Release tag to checkout' | ||
required: true | ||
type: string | ||
env: | ||
# e.g. v1.0.0 (use release tag on release events or the provided tag on manual invocation) | ||
TAG_NAME: ${{ github.event.release.tag_name || github.event.inputs.tag }} | ||
jobs: | ||
get-upload-url-release: | ||
name: Get upload URL for automated releases | ||
if: ${{ github.event.release.tag_name }} | ||
run: echo "GITHUB_UPLOAD_URL=${{ github.event.release.upload_url }}" >> $GITHUB_ENV | ||
get-upload-url-manual: | ||
name: Get upload URL for manually triggered releases | ||
if: ${{ github.event.inputs.tag }} | ||
uses: actions/github-script@v7 | ||
id: get-upload-url | ||
with: | ||
script: | | ||
github.rest.repos.getReleaseByTag({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
tag: "${{ github.event.inputs.tag }}" | ||
}); | ||
run: echo "GITHUB_UPLOAD_URL=${{ steps.get-upload-url.outputs.upload_url }}" >> $GITHUB_ENV | ||
proto-assets: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.19.2' | ||
- uses: actions/checkout@v4 | ||
- name: Init submodule | ||
run: git submodule init && git submodule update | ||
- name: Set raw version | ||
id: raw_tag | ||
# Strips the 'v' from the actual semver version. | ||
run: echo ::set-output name=raw_version::"${TAG_NAME#v}" | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v1 | ||
- name: Compile proto release assets | ||
run: go run ./util/cmd/release -version=${{ steps.raw_tag.outputs.raw_version }} | ||
- name: Upload proto release assets | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ github.token }} | ||
file: ./dist/* | ||
tag: ${{ env.TAG_NAME }} | ||
overwrite: true | ||
file_glob: true | ||
binary-assets: | ||
runs-on: ubuntu-latest | ||
needs: proto-assets | ||
strategy: | ||
matrix: | ||
osarch: | ||
- os: linux | ||
arch: amd64 | ||
- os: linux | ||
arch: arm | ||
- os: darwin | ||
arch: amd64 | ||
- os: darwin | ||
arch: arm64 | ||
- os: windows | ||
arch: amd64 | ||
steps: | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.19.2' | ||
- name: Install gox | ||
run: go install github.com/mitchellh/gox@latest | ||
- uses: actions/checkout@v4 | ||
- name: Set raw version | ||
id: raw_tag | ||
# Strips the 'v' from the actual semver version. | ||
run: echo ::set-output name=raw_version::"${TAG_NAME#v}" | ||
# The generator does not use this, but we need it to build the | ||
# binaries. | ||
# | ||
# Mousetrap is installed individually because it is needed for the | ||
# Windows build. Since we are building on Linux, it is not installed | ||
# automatically as a dependency. | ||
- name: Install the cross-platform build dependency. | ||
run: go get github.com/inconshreveable/mousetrap | ||
- name: Build for the ${{ matrix.osarch.os }}/${{ matrix.osarch.arch }} platform. | ||
run: | | ||
gox -osarch ${{ matrix.osarch.os }}/${{ matrix.osarch.arch }} -output gapic-showcase ./cmd/gapic-showcase && \ | ||
tar cvfz gapic-showcase.tar.gz gapic-showcase* | ||
- name: Upload the ${{ matrix.osarch.os }}/${{ matrix.osarch.arch }} release. | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ env.GITHUB_UPLOAD_URL }} | ||
asset_path: ./gapic-showcase.tar.gz | ||
asset_name: gapic-showcase-${{ steps.raw_tag.outputs.raw_version }}-${{ matrix.osarch.os }}-${{ matrix.osarch.arch }}.tar.gz | ||
asset_content_type: application/tar+gzip | ||
# Note: Disabled until better solution for storing the GCR key is found. | ||
# push_to_registry: | ||
# needs: | ||
# - inspect | ||
# - release | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Check out the repo | ||
# uses: actions/checkout@v2 | ||
# - name: Login to GCR | ||
# uses: docker/login-action@v1 | ||
# with: | ||
# registry: gcr.io | ||
# username: _json_key | ||
# password: ${{ secrets.GCR_JSON_KEY }} | ||
# - name: Push to GCR | ||
# uses: docker/build-push-action@v2 | ||
# with: | ||
# tags: gcr.io/gapic-images/gapic-showcase:${{ needs.inspect.outputs.raw_version }},gcr.io/gapic-images/gapic-showcase:latest | ||
# push: true | ||
# context: . |