Skip to content

remove runtime version check on release #41

remove runtime version check on release

remove runtime version check on release #41

Workflow file for this run

# .github/workflows/release.yaml
name: Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+' # Only final releases (v0.1.0)
- 'v[0-9]+.[0-9]+.[0-9]+-rc*' # Only RCs (v0.1.0-rc8)
permissions:
contents: write
packages: write
id-token: write
env:
GOPRIVATE: github.com/synadia-io/*
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Show disk space and Go temps
run: |
echo "=== Disk Usage ==="
df -h
echo
echo "=== Go Environment ==="
go env GOTMPDIR
go env GOCACHE
echo
echo "=== Temp Directories ==="
echo "TMPDIR: $TMPDIR"
echo "/tmp space:"
df -h /tmp
echo
echo "=== Available Space by Mount ==="
df -h | grep -E "(Filesystem|/dev/)"
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: 1.25.5
- name: Install cosign
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0
- name: Install syft
uses: anchore/sbom-action/download-syft@43a17d6e7add2b5535efe4dcae9952337c479a93 # v0.20.11
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.45.5
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup development environment
run: |
task setup
echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Determine release info
id: release_info
run: |
TAG="${GITHUB_REF#refs/tags/}"
echo "tag=$TAG" >> $GITHUB_OUTPUT
# Determine if this is a prerelease
if [[ "$TAG" == *"-rc"* ]]; then
echo "prerelease=true" >> $GITHUB_OUTPUT
else
echo "prerelease=false" >> $GITHUB_OUTPUT
fi
echo "name=Release $TAG" >> $GITHUB_OUTPUT
- name: Run pre-release checks
run: |
task check
task test
- name: Free up disk space and setup temp dirs
run: |
# Cleanup
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
sudo docker system prune -af
# Create temp dir on larger filesystem
sudo mkdir -p /mnt/tmp /mnt/gocache
sudo chown $USER:$USER /mnt/tmp /mnt/gocache
df -h
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --clean ${{ steps.release_info.outputs.prerelease == 'true' && '--skip=docker,sbom' || '--skip=docker' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOTMPDIR: /mnt/tmp
GOCACHE: /mnt/gocache
GORELEASER_CURRENT_TAG: ${{ steps.release_info.outputs.tag }} # override tag b/c git does not offer a tag sort to make "v1.0.6" come out on top when "v1.0.6-rc1" is present on the same commit. Goreleaser fixes this, but only in paid version
docker:
name: Build and Push Docker Image
uses: ./.github/workflows/docker-build.yml
with:
push: true
tags: |
type=ref,event=tag
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
platforms: linux/amd64,linux/arm64
image_name: connect-runtime-wombat
secrets:
AWS_REGION: ${{ vars.PRD_AWS_REGION }}
AWS_ECR_ADDR: ${{ vars.PRD_AWS_ECR_ADDR }}
AWS_ECR_PUSH_ROLE: ${{ vars.PRD_AWS_ECR_PUSH_ROLE }}