Skip to content

build(deps): bump github.com/golangci/golangci-lint in /hack/tools (#… #221

build(deps): bump github.com/golangci/golangci-lint in /hack/tools (#…

build(deps): bump github.com/golangci/golangci-lint in /hack/tools (#… #221

Workflow file for this run

# Copyright 2021 VMware
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: release
on:
push:
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+-?**'
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
with: { fetch-depth: 0 }
- name: set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: setup carvel tooling binaries
uses: vmware-tanzu/carvel-setup-action@v1
- name: run source checks
uses: ./.github/actions/source-checks
- name: generate and test a cartographer release
id: release
uses: ./.github/actions/create-and-test-release
with:
version: ${{github.ref_name}}
docker-registry: projectcartographer
docker-username: projectcartographer
docker-password: ${{ secrets.DOCKER_PASSWORD }}
release:
runs-on: ubuntu-latest
needs: validate
permissions:
contents: write
steps:
- name: checkout
uses: actions/checkout@v3
with: {fetch-depth: 0}
- name: Download staged release notes
uses: actions/download-artifact@v3
with:
name: CHANGELOG.md
- name: Draft release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: ${{ github.ref_name }}
body_path: CHANGELOG.md
draft: true
- name: Download staged Cartographer artifact
uses: actions/download-artifact@v3
with:
name: cartographer.yaml
- name: Upload Cartographer artifact to release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: cartographer.yaml
asset_name: cartographer.yaml
asset_content_type: application/x-yaml
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
cache: true
- uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}