6 Commits

Author SHA1 Message Date
29902b2e8e chore(release): 1.2.3 2021-04-14 20:43:46 +01:00
36e0863cc3 fix(release): add missing GITHUB_TOKEN env var 2021-04-14 20:43:18 +01:00
5471ff95a7 chore(release): 1.2.2 2021-04-14 20:39:57 +01:00
4c89c92f75 build(release): tweak goreleaser config 2021-04-14 20:38:46 +01:00
d19eed020c Merge pull request #3 from jimeh/github-actions
ci(github): switch from CircleCI to GitHub Actions
2021-04-14 20:34:57 +01:00
aef3e832f5 ci(github): switch from CircleCI to GitHub Actions 2021-04-14 20:32:50 +01:00
4 changed files with 42 additions and 64 deletions

View File

@@ -1,57 +0,0 @@
version: 2
jobs:
build:
docker:
- image: circleci/golang:1.16
working_directory: /go/src/github.com/jimeh/casecmp
steps:
- checkout
- run:
name: Install dependencies
command: go mod download
- run:
name: Build binary
command: make
- run:
name: Start service
command: ./bin/casecmp --port=8080
background: true
- run:
name: Validate service is working
command: |
curl --retry 10 --retry-delay 1 --retry-connrefused \
http://localhost:8080/
release:
docker:
- image: circleci/golang:1.16
working_directory: /go/src/github.com/jimeh/casecmp
steps:
- checkout
- run: curl -sL https://git.io/goreleaser | bash
workflows:
version: 2
build:
jobs:
- build:
filters:
branches:
only: /.*/
tags:
ignore: /^v[0-9]+(\.[0-9]+)*/
build-and-release:
jobs:
- build:
filters:
branches:
ignore: /.*/
tags:
only: /^v[0-9]+(\.[0-9]+)*/
- release:
requires:
- build
filters:
branches:
ignore: /.*/
tags:
only: /^v[0-9]+(\.[0-9]+)*/

40
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
---
name: CI
on: [push]
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Install dependencies
run: go mod download
- name: Build binary
run: make
- name: Run and make request
run: |
./bin/casecmp --port=8080 &
curl --silent --retry 10 --retry-delay 1 --retry-connrefused \
http://localhost:8080/
release:
name: Release
runs-on: ubuntu-latest
needs: [build]
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -18,6 +18,7 @@ builds:
- amd64
- 386
- arm
- arm64
goarm:
- 6
- 7
@@ -30,12 +31,6 @@ archives:
format_overrides:
- goos: windows
format: zip
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: "checksums.txt"

View File

@@ -1 +1 @@
1.2.1
1.2.3