Skip to content

update README.md

update README.md #62

Workflow file for this run

name: release
on:
push:
tags:
- "v*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ">=1.23.0"
check-latest: true
- name: Get Version
id: get_version
run: echo "VERSION=${GITHUB_REF##*/}" >> "${GITHUB_OUTPUT}"
- name: Run Tests
run: go test ./tests ./internal/...
- name: Test Examples
run: |
go build -o cuegen ./cmd/cuegen
export PATH=$PWD:$PATH
./scripts/test-all-examples.sh
rm cuegen
- name: Run Goreleaser
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --config=.goreleaser.yaml --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.get_version.outputs.VERSION }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
env:
VERSION: ${{ steps.get_version.outputs.VERSION }}
run: |
IMAGE=docker.io/${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }}
echo version=$VERSION
cat docker/Dockerfile-cmp
docker build . -t $IMAGE:$VERSION -t $IMAGE:latest -f docker/Dockerfile-cmp --build-arg VERSION=$VERSION
docker push $IMAGE:$VERSION
docker push $IMAGE:latest