mirror of
https://github.com/jimeh/casecmp.git
synced 2026-02-19 10:26:40 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
29902b2e8e
|
|||
|
36e0863cc3
|
|||
|
5471ff95a7
|
|||
|
4c89c92f75
|
|||
| d19eed020c | |||
|
aef3e832f5
|
@@ -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
40
.github/workflows/ci.yml
vendored
Normal 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 }}
|
||||||
@@ -18,6 +18,7 @@ builds:
|
|||||||
- amd64
|
- amd64
|
||||||
- 386
|
- 386
|
||||||
- arm
|
- arm
|
||||||
|
- arm64
|
||||||
goarm:
|
goarm:
|
||||||
- 6
|
- 6
|
||||||
- 7
|
- 7
|
||||||
@@ -30,12 +31,6 @@ archives:
|
|||||||
format_overrides:
|
format_overrides:
|
||||||
- goos: windows
|
- goos: windows
|
||||||
format: zip
|
format: zip
|
||||||
replacements:
|
|
||||||
darwin: Darwin
|
|
||||||
linux: Linux
|
|
||||||
windows: Windows
|
|
||||||
386: i386
|
|
||||||
amd64: x86_64
|
|
||||||
|
|
||||||
checksum:
|
checksum:
|
||||||
name_template: "checksums.txt"
|
name_template: "checksums.txt"
|
||||||
|
|||||||
Reference in New Issue
Block a user