Skip to content

v0.2.12 ⛴️

v0.2.12 ⛴️ #31

name: GoReleaser
on:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@master
with:
go-version: 1.18.4
- name: Install bazelisk
run: |
sudo wget -O /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/download/v1.3.0/bazelisk-linux-amd64
sudo chmod +x /usr/local/bin/bazel
- name: Check out code
uses: actions/checkout@master
- name: stamp version
run: |
echo GITHUB_REF: $GITHUB_REF
export VERSION=$(echo $GITHUB_REF|sed 's/refs\/tags\/v//')
echo "VERSION = '$VERSION\n'" > version.bzl
cat version.bzl
- name: bazel build
run : bazel build //...
- name: clean working tree
run: |
git checkout -- version.bzl
- name: setup-syft
run: |
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | \
sh -s -- -b /usr/local/bin v0.32.0
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push vbs image to ghcr.io
run: bazel run --define=IMAGE_TAG=${{ github.ref_name }} --stamp //:push_image
- name: Run goreleaser
uses: goreleaser/goreleaser-action@master
env:
POWERSHELL_TELEMETRY_OPTOUT: true
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
DISCORD_WEBHOOK_ID: ${{ secrets.DISCORD_WEBHOOK_ID }}
DISCORD_WEBHOOK_TOKEN: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
with:
version: latest
args: release