From af39fed691bc91de6c32efd4a74917c64fab3f49 Mon Sep 17 00:00:00 2001 From: Sam Alba Date: Fri, 30 Apr 2021 16:32:45 -0700 Subject: [PATCH 1/2] goreleaser: added s3 Signed-off-by: Sam Alba --- .goreleaser.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 7f6fde26..96572e4e 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -5,7 +5,8 @@ before: - go mod download builds: - - env: + - + env: - CGO_ENABLED=0 main: ./cmd/dagger binary: dagger @@ -21,12 +22,11 @@ builds: - arm64 archives: -- name_template: "{{ .ProjectName }}_{{ .Tag }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}" +- + name_template: "{{ .ProjectName }}_{{ .Tag }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}" replacements: files: - LICENSE - - README.md - - doc/**/* - examples/**/* format_overrides: - goos: windows @@ -46,13 +46,22 @@ changelog: - '^test:' brews: -- tap: +- + tap: owner: dagger name: homebrew-tap commit_author: name: dagger-bot email: noreply@dagger.io + url_template: "http://dagger-io.s3-website-us-east-1.amazonaws.com/dagger/releases/{{ .Version }}/{{ .ArtifactName }}" homepage: "https://github.com/dagger/dagger" description: "Dagger is a programmable deployment system." test: | system "#{bin}/dagger version" + +blobs: +- + provider: s3 + region: us-east-1 + bucket: dagger-io + folder: "dagger/releases/{{ .Version }}" From be2456b19005f003c2c57a4d28ace4d87101921e Mon Sep 17 00:00:00 2001 From: Sam Alba Date: Fri, 30 Apr 2021 17:16:40 -0700 Subject: [PATCH 2/2] implemented support for latest_version write + configured aws creds Signed-off-by: Sam Alba --- .github/workflows/release.yml | 8 +++++++- .goreleaser.yml | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d325aed4..2aa24719 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,9 +18,15 @@ jobs: uses: actions/setup-go@v2 with: go-version: 1.16 + - name: Configure AWS cli + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-east-1 - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 with: args: release --rm-dist env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.DAGGERCI_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 96572e4e..810289e0 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -53,7 +53,7 @@ brews: commit_author: name: dagger-bot email: noreply@dagger.io - url_template: "http://dagger-io.s3-website-us-east-1.amazonaws.com/dagger/releases/{{ .Version }}/{{ .ArtifactName }}" + url_template: "https://dagger-io.s3.amazonaws.com/dagger/releases/{{ .Version }}/{{ .ArtifactName }}" homepage: "https://github.com/dagger/dagger" description: "Dagger is a programmable deployment system." test: | @@ -65,3 +65,8 @@ blobs: region: us-east-1 bucket: dagger-io folder: "dagger/releases/{{ .Version }}" + +publishers: + - + name: publish-version + cmd: sh -c "echo {{ .Version }} | aws s3 cp - s3://dagger-io/dagger/latest_version"