From 72560d3afce12ca491c32c03de6824746c4bf620 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reinhard=20N=C3=A4gele?= Date: Tue, 1 Sep 2020 21:02:06 +0200 Subject: [PATCH] wip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Reinhard Nägele --- .github/workflows/ci.yaml | 3 ++- .github/workflows/release.yaml | 29 ++++++++++++++++++++++++++++- .goreleaser.yml | 29 ----------------------------- 3 files changed, 30 insertions(+), 31 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ea25d62e..2bbcdba2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,7 +18,8 @@ jobs: with: go-version: "1.14.5" - - uses: actions/cache@v1 + - name: Cache + uses: actions/cache@v2 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 893ab599..2cd2f806 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -16,11 +16,38 @@ jobs: with: fetch-depth: 0 + - name: Setup Go + uses: actions/setup-go@v1 + with: + go-version: "1.14.5" + + - name: Cache + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Install tools + run: | + ./setup.sh + echo "::add-path::$(go env GOPATH)/bin" + - name: Tag run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + tag='${{ github.event.inputs.version }}' git tag --annotate --message "Tag for release $tag" "$tag" - git push "https://x-access-token:${{ secrets.CI_TOKEN }}/$GITHUB_REPOSITORY" "refs/tags/$tag" + git push "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY" "refs/tags/$tag" + + - name: Check License Headers + run: mage -v checkLicenseHeaders + + - name: Lint + run: mage -v lint - name: Test run: mage -v test diff --git a/.goreleaser.yml b/.goreleaser.yml index 361a191a..b843ddee 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -27,32 +27,3 @@ checksum: name_template: 'checksums.txt' snapshot: name_template: "{{ .Tag }}-next" -dockers: - - goos: linux - goarch: amd64 - binaries: - - cr - skip_push: false - dockerfile: Dockerfile - image_templates: - - quay.io/helmpack/chart-releaser:{{ .Tag }} - - quay.io/helmpack/chart-releaser:latest - build_flag_templates: - - --label=org.label-schema.schema-version=1.0 - - --label=org.label-schema.version={{ .Version }} - - --label=org.label-schema.name={{ .ProjectName }} - - --label=org.label-schema.build-date={{ .Date }} - - --label=org.label-schema.description='cr - The chart release tool' - - --label=org.label-schema.vendor=Helm -brews: - - github: - owner: helm - name: homebrew-tap - commit_author: - name: helm-bot - email: helm-bot@users.noreply.github.com - folder: Formula - homepage: https://github.com/helm/chart-releaser/ - description: Hosting Helm Charts via GitHub Pages and Releases - test: | - system "#{bin}/cr --version"