Skip to content

Commit 46a69ef

Browse files
committed
feat: split development and release build github workflows
1 parent aff4f04 commit 46a69ef

4 files changed

Lines changed: 49 additions & 5 deletions

File tree

.github/workflows/go.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
1-
name: Go
1+
name: Go - Development Build
22

3-
on: [push]
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
concurrency:
10+
# Cancels pending runs when a PR gets updated.
11+
group: ${{ github.head_ref || github.run_id }}-${{ github.actor }}
12+
cancel-in-progress: true
413

514
jobs:
615
build:
@@ -40,7 +49,6 @@ jobs:
4049
uses: actions/setup-go@v4.0.1
4150
with:
4251
go-version: 1.20.7
43-
4452
- name: Run golangci-lint
4553
uses: golangci/golangci-lint-action@v3.6.0
4654
with:

.github/workflows/release.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Go - Release Build
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
concurrency:
9+
# Cancels pending runs when a PR gets updated.
10+
group: ${{ github.head_ref || github.run_id }}-${{ github.actor }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
contents: write
15+
16+
jobs:
17+
goreleaser:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v3.5.3
21+
with:
22+
fetch-depth: 0
23+
- run: git fetch --force --tags
24+
- name: Setup Go
25+
uses: actions/setup-go@v4.0.1
26+
with:
27+
go-version: 1.20.7
28+
- name: Execute GoReleaser
29+
uses: goreleaser/goreleaser-action@v4.4.0
30+
if: startsWith(github.ref, 'refs/tags/')
31+
with:
32+
distribution: goreleaser
33+
version: latest
34+
args: release --clean
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# BigQuery 2 CSV
22

3-
[![Workflows](https://github.com/wintermi/bq2csv/workflows/Go/badge.svg)](https://github.com/wintermi/bq2csv/actions/workflows/go.yml)
3+
[![Workflows](https://github.com/wintermi/bq2csv/workflows/Go/badge.svg)](https://github.com/wintermi/bq2csv/actions)
44
[![Go Report](https://goreportcard.com/badge/github.com/wintermi/bq2csv)](https://goreportcard.com/report/github.com/wintermi/bq2csv)
55
[![License](https://img.shields.io/github/license/wintermi/bq2csv)](https://github.com/wintermi/bq2csv/blob/main/LICENSE)
66
[![Release](https://img.shields.io/github/v/release/wintermi/bq2csv?include_prereleases)](https://github.com/wintermi/bq2csv/releases)

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
)
2626

2727
var logger zerolog.Logger
28-
var applicationText = "%s 0.1.1%s"
28+
var applicationText = "%s 0.1.2%s"
2929
var copyrightText = "Copyright 2022-2023, Matthew Winter\n"
3030
var indent = "..."
3131

0 commit comments

Comments
 (0)