blob: 30d0c5dd40b46df318fb853e0712f008d6855e3a [file] [log] [blame]
# Generated by internal/ci/ci_tool.cue; do not edit
name: Release
on:
push:
tags:
- v*
jobs:
goreleaser:
runs-on: ubuntu-18.04
defaults:
run:
shell: bash
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
version: 1.15.8
stable: false
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
args: release --rm-dist
version: v0.155.1
env:
GITHUB_TOKEN: ${{ secrets.ACTIONS_GITHUB_TOKEN }}
docker:
name: docker
runs-on: ubuntu-18.04
defaults:
run:
shell: bash
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set version environment
run: |-
CUE_VERSION=$(echo ${GITHUB_REF##refs/tags/v})
echo "CUE_VERSION=$CUE_VERSION"
echo "CUE_VERSION=$(echo $CUE_VERSION)" >> $GITHUB_ENV
- name: Push to Docker Hub
uses: docker/build-push-action@v1
with:
tags: ${{ env.CUE_VERSION }},latest
repository: cuelang/cue
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tag_with_ref: false
tag_with_sha: false
target: cue
always_pull: true
build_args: GOLANG_VERSION=${{ env.GOLANG_VERSION }},CUE_VERSION=v${{ env.CUE_VERSION
}}
add_git_labels: true
env:
DOCKER_BUILDKIT: 1
GOLANG_VERSION: 1.14
CUE_VERSION: ${{ env.CUE_VERSION }}