Skip to content
This repository has been archived by the owner on Nov 12, 2023. It is now read-only.

Commit

Permalink
release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio1988 committed Oct 29, 2023
1 parent f120afc commit fb147c9
Show file tree
Hide file tree
Showing 4 changed files with 194 additions and 125 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/go.yml

This file was deleted.

63 changes: 60 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
name: publish
name: Go

on: [push]
on: [push, pull_request]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
go-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
check-latest: true

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...
build-and-push-image:
runs-on: ubuntu-latest
needs: [ go-build ]
permissions:
contents: read
packages: write
Expand All @@ -32,4 +49,44 @@ jobs:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}
relase:
strategy:
matrix:
go_version: [ 1.21.x ]
permissions: write-all
runs-on: ubuntu-latest
needs: [ go-build ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go 1.21
if: startsWith(github.ref, 'refs/tags/')
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go_version }}
- name: Build with xgo
if: startsWith(github.ref, 'refs/tags/')
uses: crazy-max/ghaction-xgo@v3
with:
xgo_version: latest
go_version: ${{ matrix.go_version }}
dest: build
targets: linux/amd64,linux/arm64
v: true
x: false
ldflags: -s -w
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
with:
name: Release ${{ github.ref}}
tag_name: ${{ github.ref }}
draft: true
prerelease: true
fail_on_unmatched_files: true
files: |
./build/*
59 changes: 30 additions & 29 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,79 +1,80 @@
module flygon

go 1.20
go 1.21

toolchain go1.21.2

require (
github.com/Depado/ginprom v1.7.11
github.com/getsentry/sentry-go v0.21.0
github.com/getsentry/sentry-go v0.25.0
github.com/gin-gonic/gin v1.9.1
github.com/go-sql-driver/mysql v1.7.1
github.com/golang-migrate/migrate/v4 v4.16.2
github.com/grafana/pyroscope-go v1.0.4
github.com/jellydator/ttlcache/v3 v3.0.1
github.com/jellydator/ttlcache/v3 v3.1.0
github.com/jmoiron/sqlx v1.3.5
github.com/knadh/koanf/maps v0.1.1
github.com/knadh/koanf/parsers/toml v0.1.0
github.com/knadh/koanf/providers/file v0.1.0
github.com/knadh/koanf/providers/structs v0.1.0
github.com/knadh/koanf/v2 v2.0.1
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.15.1
github.com/ringsaturn/tzf v0.13.0
github.com/prometheus/client_golang v1.17.0
github.com/ringsaturn/tzf v0.14.0
github.com/ringsaturn/tzf-rel v0.0.2023-b
github.com/sirupsen/logrus v1.9.3
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1
google.golang.org/protobuf v1.30.0
golang.org/x/exp v0.0.0-20231006140011-7918f672742d
google.golang.org/protobuf v1.31.0
gopkg.in/guregu/null.v4 v4.0.0
gopkg.in/natefinch/lumberjack.v2 v2.2.1
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/bytedance/sonic v1.9.1 // indirect
github.com/bytedance/sonic v1.10.2 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
github.com/chenzhuoyu/iasm v0.9.0 // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.14.1 // indirect
github.com/go-playground/validator/v10 v10.15.5 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/grafana/pyroscope-go/godeltaprof v0.1.4 // indirect
github.com/grafana/pyroscope-go/godeltaprof v0.1.5 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/paulmach/orb v0.9.2 // indirect
github.com/paulmach/orb v0.10.0 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/tidwall/geoindex v1.7.0 // indirect
github.com/tidwall/geojson v1.4.3 // indirect
github.com/tidwall/rtree v1.10.0 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/twpayne/go-polyline v1.1.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
go.mongodb.org/mongo-driver v1.11.7 // indirect
go.mongodb.org/mongo-driver v1.12.1 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/goleak v1.2.1 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/crypto v0.9.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/sync v0.2.0 // indirect
golang.org/x/sys v0.9.0 // indirect
golang.org/x/text v0.10.0 // indirect
golang.org/x/arch v0.5.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sync v0.4.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit fb147c9

Please sign in to comment.