Skip to content

Release

Release #36

Workflow file for this run

name: Release
on:
workflow_run:
workflows: ["Tag Version"]
types:
- completed
permissions:
contents: write
actions: write
repository-projects: write
jobs:
goreleaser:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.3
- name: GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
push:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
needs: goreleaser
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get the latest tag
id: get_version
run: |
TAG=$(git describe --abbrev=0)
echo "Latest tag: $TAG"
echo "::set-output name=VERSION::$TAG"
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build & Push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
similarweb/bbox:${{ steps.get_version.outputs.VERSION }}
similarweb/bbox:latest