diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index beb4dba..df28ef9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,33 +4,20 @@ on: pull_request: jobs: - - main: - name: Main Process + build: + name: Build application runs-on: ubuntu-latest - env: - GO_VERSION: stable - CGO_ENABLED: 0 steps: - - # https://github.com/marketplace/actions/checkout - name: Check out code uses: actions/checkout@v4 with: fetch-depth: 0 - # https://github.com/marketplace/actions/setup-go-environment - - name: Set up Go ${{ env.GO_VERSION }} + - name: Set up Go uses: actions/setup-go@v5 with: - go-version: ${{ env.GO_VERSION }} - - - name: Check and get dependencies - run: | - go mod tidy - git diff --exit-code go.mod - git diff --exit-code go.sum + go-version: stable - name: Make run: make build diff --git a/.github/workflows/dockerhub-description.yml b/.github/workflows/dockerhub-description.yml deleted file mode 100644 index 763aa45..0000000 --- a/.github/workflows/dockerhub-description.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: "Update Docker Hub Description" -on: - push: - tags: - - v* - -jobs: - description: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Docker Hub Description - uses: peter-evans/dockerhub-description@v4 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} - short-description: ${{ github.event.repository.description }} \ No newline at end of file diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index df7e979..57a4ff9 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -1,4 +1,5 @@ name: golangci-lint + on: pull_request: diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml deleted file mode 100644 index 4664dca..0000000 --- a/.github/workflows/goreleaser.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: "goreleaser" -on: - push: - tags: - - v* - -permissions: - id-token: write # For cosign - packages: write # For GHCR - contents: write # Releases - -jobs: - release: - name: Release Process - runs-on: ubuntu-latest - env: - CGO_ENABLED: 0 - - steps: - # https://github.com/marketplace/actions/checkout - - name: Check out code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - # https://github.com/marketplace/actions/setup-go-environment - - name: Set up Go ${{ env.GO_VERSION }} - uses: actions/setup-go@v5 - with: - go-version: stable - - - name: dockerhub-login - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: ghcr-login - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Install Cosign - uses: sigstore/cosign-installer@v3.7.0 - - # https://goreleaser.com/ci/actions/ - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v6 - with: - version: latest - args: release --clean - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3233e9c..2c0c291 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,5 @@ name: "Release" + on: push: branches: @@ -67,3 +68,10 @@ jobs: run: | npm i -G semantic-release@~23.0.0 @semantic-release/exec@~6.0.3 @semantic-release/git@~10.0.1 npx semantic-release + + - name: Docker Hub Description + uses: peter-evans/dockerhub-description@v4 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + short-description: ${{ github.event.repository.description }} \ No newline at end of file diff --git a/Makefile b/Makefile index f56a0fc..1beee72 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ IMAGE_NAME := sablierapp/mimic build: - goreleaser build --single-target --clean --snapshot + CGO_ENABLED=0 go build -a --trimpath --installsuffix cgo --ldflags="-s" -o mimic check: golangci-lint run