From 3173078a64a094c7751f5337019b02f8a3be4191 Mon Sep 17 00:00:00 2001 From: Chandan Pasunoori Date: Sun, 6 Nov 2022 08:56:35 +0000 Subject: [PATCH] github acction --- .github/workflows/ci.yml | 40 ++++++++++++++++++++++++++++++++++++++++ .goreleaser.yml | 10 ---------- 2 files changed, 40 insertions(+), 10 deletions(-) create mode 100755 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100755 index 0000000..2d862ee --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,40 @@ +name: goreleaser + +on: + push: + tags: + - '*' + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - + name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.18 + - + name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GH_PAT }} + - + name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + distribution: goreleaser + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index fd4427d..4a296c3 100755 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -35,7 +35,6 @@ changelog: dockers: - image_templates: - ghcr.io/chandanpasunoori/{{ .ProjectName }}:{{ .Version }}-amd64 - - docker.io/chandanpasunoori/{{ .ProjectName }}:{{ .Version }}-amd64 dockerfile: Dockerfile use: buildx build_flag_templates: @@ -50,7 +49,6 @@ dockers: - --label=org.opencontainers.image.licenses=MIT - image_templates: - ghcr.io/chandanpasunoori/{{ .ProjectName }}:{{ .Version }}-arm64v8 - - docker.io/chandanpasunoori/{{ .ProjectName }}:{{ .Version }}-arm64v8 goarch: arm64 dockerfile: Dockerfile use: buildx @@ -73,11 +71,3 @@ docker_manifests: image_templates: - ghcr.io/chandanpasunoori/{{ .ProjectName }}:{{ .Version }}-amd64 - ghcr.io/chandanpasunoori/{{ .ProjectName }}:{{ .Version }}-arm64v8 - - name_template: docker.io/chandanpasunoori/{{ .ProjectName }}:{{ .Version }} - image_templates: - - docker.io/chandanpasunoori/{{ .ProjectName }}:{{ .Version }}-amd64 - - docker.io/chandanpasunoori/{{ .ProjectName }}:{{ .Version }}-arm64v8 - - name_template: docker.io/chandanpasunoori/{{ .ProjectName }}:latest - image_templates: - - docker.io/chandanpasunoori/{{ .ProjectName }}:{{ .Version }}-amd64 - - docker.io/chandanpasunoori/{{ .ProjectName }}:{{ .Version }}-arm64v8