Skip to content

Bump google.golang.org/grpc from 1.65.0 to 1.66.0 (#66) #175

Bump google.golang.org/grpc from 1.65.0 to 1.66.0 (#66)

Bump google.golang.org/grpc from 1.65.0 to 1.66.0 (#66) #175

Workflow file for this run

name: build
on:
push:
branches:
- main
- "feature/**"
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v4
- name: setup go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: test
run: |
export GOTESTSUM_VERSION=1.12.0
curl -L https://github.com/gotestyourself/gotestsum/releases/download/v${GOTESTSUM_VERSION}/gotestsum_${GOTESTSUM_VERSION}_linux_amd64.tar.gz | sudo tar -C /usr/local/bin -xz
gotestsum --format short-verbose --no-summary=skipped ./...
- name: build
uses: goreleaser/goreleaser-action@master
with:
version: latest
args: --skip=publish,validate --clean --snapshot
- name: prepare dist directory
run: |
find ./dist/ -not -name '*.tar.gz' -not -name '*.zip' -not -name 'dist' -not -wholename './dist/grpc-ditto_linux_amd*' -not -name 'pkg' -delete
cp Dockerfile dist/
- name: store artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: |
dist
release:
name: release
outputs:
release_url: ${{ steps.create_release.outputs.upload_url }}
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: download artifacts
uses: actions/download-artifact@v3
with:
name: dist
- name: prep
id: prep
run: |
find . -name "grpc-ditto*" -type f -exec chmod +x {} \;
echo ::set-output name=tags::${GITHUB_REF#refs/tags/v}
- name: create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: |
v${{ steps.prep.outputs.tags }}
draft: false
prerelease: true
- name: set up docker buildx
uses: docker/setup-buildx-action@v2
- name: login to github container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build and push
uses: docker/build-push-action@v3
with:
context: grpc-ditto_linux_amd64_v1
file: ./Dockerfile
push: true
tags: |
ghcr.io/vadimi/grpc-ditto:latest
ghcr.io/vadimi/grpc-ditto:${{ steps.prep.outputs.tags }}
upload-artifacts:
name: upload-artifacts
needs: release
runs-on: ubuntu-latest
steps:
- name: download artifacts
uses: actions/download-artifact@v2
with:
name: dist
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: pkg/grpc-ditto*
tag: ${{ github.ref }}
overwrite: true
file_glob: true