Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci :updates release process #87

Merged
merged 26 commits into from Jan 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2767337
feat: adds goreleaser basic config
mavogel Jan 9, 2021
01f3807
ci: adds release workflow
mavogel Jan 9, 2021
aee2ff6
ci: adds test workflow
mavogel Jan 9, 2021
4161d83
ci: removes travis.yml
mavogel Jan 9, 2021
38c7aef
ci: removes setting of TZ for test flow
mavogel Jan 9, 2021
c652afe
ci: fix test flow indentation
mavogel Jan 9, 2021
bbdb063
ci: aligns gh actions ymls
mavogel Jan 9, 2021
9b7e1bb
feat: adds brews and changelog to goreleaser
mavogel Jan 12, 2021
5a110d4
fix: release workflow for tags only
mavogel Jan 12, 2021
92c6f5c
ci: run test for push only on master
mavogel Jan 12, 2021
236efe0
feat: adds coveralls gh action after tests
mavogel Jan 13, 2021
3a7b4d9
fix: switches to builtin GITHUB_TOKEN for releasing
mavogel Jan 13, 2021
22cf9b5
ci: fix path to coverage file for test action
mavogel Jan 13, 2021
1e1754b
build: integrates coverage to test target
mavogel Jan 13, 2021
4304faa
ci: removes coverage target call for test action
mavogel Jan 13, 2021
a2a853e
fix: sets test covermode to atomic
mavogel Jan 13, 2021
07c8977
ci: using goveralls for sending test report
mavogel Jan 13, 2021
e2a8cb2
chore: removes deprecated release script
mavogel Jan 14, 2021
41bd4f6
chore(release.yaml): adds newline
mavogel Jan 14, 2021
f84f52a
chore(makefile): fix listing of test files
mavogel Jan 14, 2021
f303a2d
chore: removes spaces from newline
mavogel Jan 14, 2021
2f1eeda
chore: adapts workflow yaml formatting
mavogel Jan 15, 2021
943105f
chore: adds newline for test.yaml
mavogel Jan 15, 2021
29635ce
build(goreleaser): removes replacements section for archives
mavogel Jan 15, 2021
8bb6ecd
build(goreleaser): removes skip_upload from brew tap
mavogel Jan 15, 2021
e8aa8e2
build(goreleaser): make a zip for windows archive
mavogel Jan 15, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,26 @@
name: goreleaser

on:
push:
tags:
- '*'

jobs:
goreleaser:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
mavogel marked this conversation as resolved.
Show resolved Hide resolved
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37 changes: 37 additions & 0 deletions .github/workflows/test.yml
@@ -0,0 +1,37 @@
name: tests

on:
pull_request:
types: ['opened', 'synchronize']
paths-ignore:
- 'README.md'
push:
branches:
- master
paths-ignore:
- 'README.md'
jobs:
unit:
runs-on: ubuntu-20.04
strategy:
fail-fast: true
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15
- name: Run tests
run: |
make test
- name: Install goveralls
env:
GO111MODULE: off
run: go get github.com/mattn/goveralls
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: goveralls -coverprofile=cover.out -service=github
48 changes: 48 additions & 0 deletions .goreleaser.yml
@@ -0,0 +1,48 @@
# This is an example .goreleaser.yml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
project_name: git-chglog

before:
hooks:
# You may remove this if you don't use go modules.
- go mod download

builds:
- dir: cmd/git-chglog
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm
- arm64
goarm:
- 6

archives:
- format_overrides:
- goos: windows
format: zip

checksum:
name_template: 'checksums.txt'

changelog:
sort: asc

snapshot:
name_template: "{{ .Tag }}-next"

brews:
- tap:
owner: git-chglog
name: homebrew-git-chglog
homepage: "https://godoc.org/github.com/git-chglog/git-chglog"
description: "CHANGELOG generator implemented in Go (Golang)."
test: |
system "#{bin}/git-chglog --help"
install: |
bin.install "git-chglog"
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

8 changes: 1 addition & 7 deletions Makefile
Expand Up @@ -11,13 +11,7 @@ build:

.PHONY: test
test:
go test -v `go list ./...`

.PHONY: coverage
coverage:
goverage -coverprofile=cover.out `go list ./...`
go tool cover -func=cover.out
@rm -rf cover.out
go test -covermode atomic -coverprofile cover.out -v ./...

.PHONY: install
install:
Expand Down
10 changes: 0 additions & 10 deletions scripts/release.sh

This file was deleted.