mirror of
https://github.com/jimeh/casecmp.git
synced 2026-02-19 10:26:40 +00:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5b77604aad | |||
|
|
ff5cbcb63d
|
||
|
770dad5e32
|
|||
| c39b4321e3 | |||
|
|
71d0525714 | ||
| a02e372f2a | |||
|
5500933689
|
|||
| 61f987a007 | |||
|
1a9e060f1e
|
|||
| 9da6bec077 | |||
|
438a238547
|
|||
|
37bcb99917
|
|||
|
dfe6ce7c24
|
59
.github/workflows/ci.yml
vendored
59
.github/workflows/ci.yml
vendored
@@ -8,9 +8,9 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-go@v3
|
- uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: 1.19
|
go-version: "1.20"
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: go mod download
|
run: go mod download
|
||||||
- name: Build binary
|
- name: Build binary
|
||||||
@@ -27,46 +27,69 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: azure/setup-helm@v3
|
- uses: azure/setup-helm@v3
|
||||||
with:
|
with:
|
||||||
token: "${{ secrets.GITHUB_TOKEN }}"
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Lint chart
|
- name: Lint chart
|
||||||
run: helm lint chart
|
run: helm lint chart
|
||||||
- name: Template chart
|
- name: Template chart
|
||||||
run: helm template chart
|
run: helm template chart
|
||||||
|
|
||||||
release-please:
|
release-please:
|
||||||
|
name: Release Please
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build, helm-lint]
|
|
||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
|
outputs:
|
||||||
|
release_created: ${{ steps.release-please.outputs.release_created }}
|
||||||
|
tag_name: ${{ steps.release-please.outputs.tag_name }} # e.g. v1.0.0
|
||||||
|
version: ${{ steps.release-please.outputs.version }} # e.g. 1.0.0
|
||||||
|
all: ${{ toJSON(steps.release-please.outputs) }}
|
||||||
steps:
|
steps:
|
||||||
- uses: google-github-actions/release-please-action@v3
|
- uses: google-github-actions/release-please-action@v3
|
||||||
id: release-please
|
id: release-please
|
||||||
with:
|
with:
|
||||||
command: manifest
|
command: manifest
|
||||||
- if: ${{ steps.release-please.outputs.release_created }}
|
|
||||||
uses: actions/checkout@v3
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [build, helm-lint, release-please]
|
||||||
|
if: needs.release-please.outputs.release_created
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- if: ${{ steps.release-please.outputs.release_created }}
|
- run: git fetch --force --tags
|
||||||
name: Set up QEMU
|
- name: Configure Git
|
||||||
|
run: |
|
||||||
|
git config user.name "${{ github.actor }}"
|
||||||
|
git config user.email "${{ github.actor }}@users.noreply.github.com"
|
||||||
|
- name: Install Helm
|
||||||
|
uses: azure/setup-helm@v3
|
||||||
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v2
|
||||||
- if: ${{ steps.release-please.outputs.release_created }}
|
- uses: docker/setup-buildx-action@v2
|
||||||
uses: docker/setup-buildx-action@v2
|
- name: Docker Login
|
||||||
- if: ${{ steps.release-please.outputs.release_created }}
|
|
||||||
name: Docker Login
|
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- if: ${{ steps.release-please.outputs.release_created }}
|
- uses: actions/setup-go@v4
|
||||||
uses: actions/setup-go@v3
|
|
||||||
with:
|
with:
|
||||||
go-version: 1.19
|
go-version: "1.20"
|
||||||
- if: ${{ steps.release-please.outputs.release_created }}
|
- name: Run GoReleaser
|
||||||
name: Run GoReleaser
|
|
||||||
uses: goreleaser/goreleaser-action@v2
|
uses: goreleaser/goreleaser-action@v2
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
args: release --rm-dist
|
args: release --rm-dist
|
||||||
env:
|
env:
|
||||||
|
REGISTRY: ghcr.io
|
||||||
|
IMAGE_NAME: ${{ github.repository }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Package chart
|
||||||
|
run: helm package ./chart -d .cr-release-packages
|
||||||
|
- name: Run chart-releaser
|
||||||
|
uses: helm/chart-releaser-action@v1
|
||||||
|
with:
|
||||||
|
config: .cr.yaml
|
||||||
|
skip_packaging: true
|
||||||
|
env:
|
||||||
|
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ changelog:
|
|||||||
|
|
||||||
dockers:
|
dockers:
|
||||||
- image_templates:
|
- image_templates:
|
||||||
- "ghcr.io/jimeh/casecmp:{{ .Version }}-amd64"
|
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-amd64"
|
||||||
- "ghcr.io/jimeh/casecmp:latest-amd64"
|
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-amd64"
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
use: buildx
|
use: buildx
|
||||||
goos: linux
|
goos: linux
|
||||||
@@ -56,8 +56,8 @@ dockers:
|
|||||||
build_flag_templates:
|
build_flag_templates:
|
||||||
- "--platform=linux/amd64"
|
- "--platform=linux/amd64"
|
||||||
- image_templates:
|
- image_templates:
|
||||||
- "ghcr.io/jimeh/casecmp:{{ .Version }}-386"
|
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-386"
|
||||||
- "ghcr.io/jimeh/casecmp:latest-386"
|
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-386"
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
use: buildx
|
use: buildx
|
||||||
goos: linux
|
goos: linux
|
||||||
@@ -65,8 +65,8 @@ dockers:
|
|||||||
build_flag_templates:
|
build_flag_templates:
|
||||||
- "--platform=linux/386"
|
- "--platform=linux/386"
|
||||||
- image_templates:
|
- image_templates:
|
||||||
- "ghcr.io/jimeh/casecmp:{{ .Version }}-arm64"
|
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-arm64"
|
||||||
- "ghcr.io/jimeh/casecmp:latest-arm64"
|
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-arm64"
|
||||||
use: buildx
|
use: buildx
|
||||||
goos: linux
|
goos: linux
|
||||||
goarch: arm64
|
goarch: arm64
|
||||||
@@ -74,8 +74,8 @@ dockers:
|
|||||||
build_flag_templates:
|
build_flag_templates:
|
||||||
- "--platform=linux/arm64"
|
- "--platform=linux/arm64"
|
||||||
- image_templates:
|
- image_templates:
|
||||||
- "ghcr.io/jimeh/casecmp:{{ .Version }}-armv6"
|
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-armv6"
|
||||||
- "ghcr.io/jimeh/casecmp:latest-armv6"
|
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-armv6"
|
||||||
use: buildx
|
use: buildx
|
||||||
goos: linux
|
goos: linux
|
||||||
goarch: arm
|
goarch: arm
|
||||||
@@ -84,8 +84,8 @@ dockers:
|
|||||||
build_flag_templates:
|
build_flag_templates:
|
||||||
- "--platform=linux/arm/v6"
|
- "--platform=linux/arm/v6"
|
||||||
- image_templates:
|
- image_templates:
|
||||||
- "ghcr.io/jimeh/casecmp:{{ .Version }}-armv7"
|
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-armv7"
|
||||||
- "ghcr.io/jimeh/casecmp:latest-armv7"
|
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-armv7"
|
||||||
use: buildx
|
use: buildx
|
||||||
goos: linux
|
goos: linux
|
||||||
goarch: arm
|
goarch: arm
|
||||||
@@ -95,17 +95,17 @@ dockers:
|
|||||||
- "--platform=linux/arm/v7"
|
- "--platform=linux/arm/v7"
|
||||||
|
|
||||||
docker_manifests:
|
docker_manifests:
|
||||||
- name_template: ghcr.io/jimeh/casecmp:{{ .Version }}
|
- name_template: "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}"
|
||||||
image_templates:
|
image_templates:
|
||||||
- ghcr.io/jimeh/casecmp:{{ .Version }}-amd64
|
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-amd64"
|
||||||
- ghcr.io/jimeh/casecmp:{{ .Version }}-386
|
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-386"
|
||||||
- ghcr.io/jimeh/casecmp:{{ .Version }}-arm64
|
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-arm64"
|
||||||
- ghcr.io/jimeh/casecmp:{{ .Version }}-armv6
|
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-armv6"
|
||||||
- ghcr.io/jimeh/casecmp:{{ .Version }}-armv7
|
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-armv7"
|
||||||
- name_template: ghcr.io/jimeh/casecmp:latest
|
- name_template: "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest"
|
||||||
image_templates:
|
image_templates:
|
||||||
- ghcr.io/jimeh/casecmp:latest-amd64
|
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-amd64"
|
||||||
- ghcr.io/jimeh/casecmp:latest-386
|
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-386"
|
||||||
- ghcr.io/jimeh/casecmp:latest-arm64
|
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-arm64"
|
||||||
- ghcr.io/jimeh/casecmp:latest-armv6
|
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-armv6"
|
||||||
- ghcr.io/jimeh/casecmp:latest-armv7
|
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-armv7"
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
".": "2.2.0"
|
".": "2.3.0"
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,12 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [2.3.0](https://github.com/jimeh/casecmp/compare/v2.2.0...v2.3.0) (2023-04-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **version:** add Go version to version output ([5500933](https://github.com/jimeh/casecmp/commit/55009336891b6c281542cf85498abb04816879d3))
|
||||||
|
|
||||||
## [2.2.0](https://github.com/jimeh/casecmp/compare/v2.1.0...v2.2.0) (2023-03-10)
|
## [2.2.0](https://github.com/jimeh/casecmp/compare/v2.1.0...v2.2.0) (2023-03-10)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,10 +15,10 @@ type: application
|
|||||||
# This is the chart version. This version number should be incremented each time you make changes
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
# to the chart and its templates, including the app version.
|
# to the chart and its templates, including the app version.
|
||||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||||
version: 2.2.0 # x-release-please-version
|
version: 2.3.0 # x-release-please-version
|
||||||
|
|
||||||
# This is the version number of the application being deployed. This version number should be
|
# This is the version number of the application being deployed. This version number should be
|
||||||
# incremented each time you make changes to the application. Versions are not expected to
|
# incremented each time you make changes to the application. Versions are not expected to
|
||||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||||
# It is recommended to use it with quotes.
|
# It is recommended to use it with quotes.
|
||||||
appVersion: 2.2.0 # x-release-please-version
|
appVersion: 2.3.0 # x-release-please-version
|
||||||
|
|||||||
2
go.mod
2
go.mod
@@ -1,3 +1,3 @@
|
|||||||
module github.com/jimeh/casecmp
|
module github.com/jimeh/casecmp
|
||||||
|
|
||||||
go 1.19
|
go 1.20
|
||||||
|
|||||||
3
main.go
3
main.go
@@ -9,6 +9,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"text/template"
|
"text/template"
|
||||||
@@ -154,6 +155,8 @@ func printVersion() {
|
|||||||
buffer.WriteString(fmt.Sprintf(" (%s)", commit))
|
buffer.WriteString(fmt.Sprintf(" (%s)", commit))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buffer.WriteString(fmt.Sprintf(", built with %s", runtime.Version()))
|
||||||
|
|
||||||
fmt.Println(buffer.String())
|
fmt.Println(buffer.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"release-type": "go",
|
|
||||||
"bump-minor-pre-major": true,
|
|
||||||
"bump-patch-for-minor-pre-major": true,
|
|
||||||
"packages": {
|
"packages": {
|
||||||
".": {
|
".": {
|
||||||
|
"release-type": "go",
|
||||||
"changelog-path": "CHANGELOG.md",
|
"changelog-path": "CHANGELOG.md",
|
||||||
|
"bump-minor-pre-major": true,
|
||||||
|
"bump-patch-for-minor-pre-major": true,
|
||||||
"draft": false,
|
"draft": false,
|
||||||
"prerelease": false,
|
"prerelease": false,
|
||||||
"extra-files": [
|
"extra-files": [
|
||||||
|
|||||||
Reference in New Issue
Block a user