Skip to content

Commit

Permalink
Feat: Add GitHub actions workflow for tag-based release (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
ozansz authored Mar 8, 2023
2 parents ace241b + 7d24f24 commit 4089272
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test and release

on:
push:
tags:
- 'v*.*.*'

jobs:
test-and-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '^1.19'
- uses: ko-build/[email protected]
- name: Run tests
run: go test -v ./...
- name: Login to GCR
uses: docker/login-action@v2
with:
registry: gcr.io
username: _json_key
password: ${{ secrets.GCR_JSON_KEY }}
- name: Release
run: |
build_tag="${{ github.ref_name }}"
if [[ "$build_tag" != *-alpha ]]; then
build_tag += ",latest"
fi
./deploy/scripts/build.sh "$build_tag" gcr.io/edgedelta all

0 comments on commit 4089272

Please sign in to comment.