Skip to content

Commit

Permalink
chore(ci): refactor releases to release-please (#839)
Browse files Browse the repository at this point in the history
  • Loading branch information
noahdietz authored Dec 14, 2021
1 parent 944e5d8 commit 6e0e4f1
Show file tree
Hide file tree
Showing 8 changed files with 92 additions and 305 deletions.
1 change: 0 additions & 1 deletion .github/release-tool/BUILD.bazel

This file was deleted.

104 changes: 0 additions & 104 deletions .github/release-tool/changelog.go

This file was deleted.

67 changes: 0 additions & 67 deletions .github/release-tool/main.go

This file was deleted.

70 changes: 70 additions & 0 deletions .github/workflows/assets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
name: assets
on:
release:
types:
- created

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
osarch:
- os: linux
arch: amd64
- os: linux
arch: arm
- os: darwin
arch: amd64
- os: windows
arch: amd64
steps:
- uses: actions/setup-go@v2
with:
go-version: '1.15.8'
- uses: actions/checkout@v2
# The generator does not use these, but we need them 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 tool.
run: |
go get github.com/mitchellh/gox
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 protoc-gen-go_gapic ./cmd/protoc-gen-go_gapic && \
tar cvfz protoc-gen-go_gapic.tar.gz protoc-gen-go_gapic*
- name: Upload the ${{ matrix.osarch.os }}/${{ matrix.osarch.arch }} release.
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./protoc-gen-go_gapic.tar.gz
asset_name: protoc-gen-go_gapic-${{ github.event.release.tag_name }}-${{ matrix.osarch.os }}-${{ matrix.osarch.arch }}.tar.gz
asset_content_type: application/tar+gzip
# push_to_registry:
# needs:
# - inspect
# runs-on: ubuntu-latest
# steps:
# - name: Check out the repo
# uses: actions/checkout@v2
# - name: Compile plugin binary
# run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build ./cmd/protoc-gen-go_gapic
# - 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-generator-go:${{ needs.inspect.outputs.raw_version }},gcr.io/gapic-images/gapic-generator-go:latest
# push: true
# context: .
4 changes: 2 additions & 2 deletions .github/workflows/deps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ jobs:
upstream_owner: googleapis
upstream_repo: gapic-generator-go
description: 'Updated Go dependencies for Bazel repositories.'
title: 'chore: update Bazel Go deps'
message: 'chore: update Bazel Go deps'
title: 'chore(bazel): update Bazel Go deps'
message: 'chore(bazel): update Bazel Go deps'
primary: 'main'
labels: |
automerge
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
on:
push:
branches:
- main
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: simple
112 changes: 0 additions & 112 deletions .github/workflows/release.yaml

This file was deleted.

Loading

0 comments on commit 6e0e4f1

Please sign in to comment.