4 Commits

7 changed files with 67 additions and 23 deletions

View File

@@ -6,41 +6,51 @@ jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- uses: actions/setup-go@v2 - uses: actions/setup-go@v3
with: with:
go-version: 1.18 go-version: 1.19
- name: Install dependencies - name: Install dependencies
run: go mod download run: go mod download
- name: Build binary - name: Build binary
run: make run: make
- name: Run and make request - name: Run and make request
run: | run: |
./bin/dotkatapult --port=8080 & ./bin/dotkatapult &
curl --silent --retry 10 --retry-delay 1 --retry-connrefused \ curl --silent --retry 10 --retry-delay 1 --retry-connrefused \
http://localhost:8080/ http://localhost:8080/
release: release-please:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [test] needs: [test]
if: startsWith(github.ref, 'refs/tags/v') if: github.ref == 'refs/heads/main'
steps: steps:
- uses: actions/checkout@v2 - uses: google-github-actions/release-please-action@v3
id: release-please
with:
command: manifest
- if: ${{ steps.release-please.outputs.release_created }}
uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Set up QEMU - if: ${{ steps.release-please.outputs.release_created }}
uses: docker/setup-qemu-action@v1 name: Set up QEMU
- uses: docker/setup-buildx-action@v1 uses: docker/setup-qemu-action@v2
- name: Docker Login - if: ${{ steps.release-please.outputs.release_created }}
uses: docker/login-action@v1 uses: docker/setup-buildx-action@v2
- if: ${{ steps.release-please.outputs.release_created }}
name: Docker Login
uses: docker/login-action@v2
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-go@v2 - if: ${{ steps.release-please.outputs.release_created }}
uses: actions/setup-go@v3
with: with:
go-version: 1.18 go-version: 1.19
- name: Run GoReleaser - if: ${{ steps.release-please.outputs.release_created }}
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2 uses: goreleaser/goreleaser-action@v2
with: with:
version: latest version: latest

View File

@@ -8,7 +8,7 @@ builds:
flags: flags:
- -trimpath - -trimpath
ldflags: ldflags:
- "-s -w" - "-s -w -X main.version={{ .Version }} -X main.commit={{ .Commit }}"
goos: goos:
- "darwin" - "darwin"
- "freebsd" - "freebsd"
@@ -23,16 +23,24 @@ builds:
- "6" - "6"
- "7" - "7"
archives:
- format: tar.gz
name_template: |-
{{ .ProjectName }}-{{ .Version }}_{{ .Os }}_{{ if eq .Arch "all" }}universal{{ else }}{{ .Arch }}{{ end }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}
wrap_in_directory: true
format_overrides:
- goos: windows
format: zip
replacements:
darwin: macos
checksum: checksum:
name_template: "checksums.txt" name_template: "checksums.txt"
snapshot: snapshot:
name_template: "{{ .Tag }}-next" name_template: "{{ .Tag }}-next"
changelog: changelog:
sort: asc skip: true
filters:
exclude:
- "^docs:"
- "^test:"
dockers: dockers:
- image_templates: - image_templates:

View File

@@ -0,0 +1,3 @@
{
".": "0.1.1"
}

View File

@@ -2,6 +2,13 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [0.1.1](https://github.com/jimeh/dotkatapult/compare/v0.1.0...v0.1.1) (2022-11-14)
### Features
* **build:** upgrade to go1.19 ([c4b01af](https://github.com/jimeh/dotkatapult/commit/c4b01af3e627ec8f66059898e5841d45b491f08a))
## 0.1.0 (2022-05-23) ## 0.1.0 (2022-05-23)

View File

@@ -1,4 +1,4 @@
FROM golang:1.18-alpine as builder FROM golang:1.19-alpine as builder
RUN apk add --no-cache git make RUN apk add --no-cache git make
WORKDIR /app WORKDIR /app

2
go.mod
View File

@@ -1,3 +1,3 @@
module github.com/jimeh/dotkatapult module github.com/jimeh/dotkatapult
go 1.18 go 1.19

View File

@@ -0,0 +1,16 @@
{
"bootstrap-sha": "d6789c97377f3b664c8ee987e8b2931b73d4a20f",
"last-release-sha": "d6789c97377f3b664c8ee987e8b2931b73d4a20f",
"release-type": "go",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"packages": {
".": {
"changelog-path": "CHANGELOG.md",
"draft": false,
"prerelease": false,
"extra-files": []
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}