Skip to content

Remove arm from the release #4

Remove arm from the release

Remove arm from the release #4

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
packages: write
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.25.1'
- name: Get version
id: version
run: |
VERSION=${GITHUB_REF#refs/tags/v}
echo "version=$VERSION" >> $GITHUB_OUTPUT
# Check if this is a pre-release (contains alpha, beta, rc, etc.)
if [[ $VERSION =~ (alpha|beta|rc) ]]; then
echo "prerelease=true" >> $GITHUB_OUTPUT
echo "docker_tag=dev" >> $GITHUB_OUTPUT
else
echo "prerelease=false" >> $GITHUB_OUTPUT
echo "docker_tag=latest" >> $GITHUB_OUTPUT
fi
- name: Build binaries
run: |
mkdir -p build
# Linux AMD64
GOOS=linux GOARCH=amd64 go build -ldflags="-X main.Version=${{ steps.version.outputs.version }}" -o build/indexer indexer/main.go
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: build/*
prerelease: ${{ steps.version.outputs.prerelease }}
generate_release_notes: true
body: |
## Release ${{ steps.version.outputs.version }}
### Installation
Download the binary for your platform and make it executable:
```bash
chmod +x indexer-*
From here you can run the indexer using live or historic mode
./indexer live --config config.yml
./indexer historic --config config.yml --from-height 1000 --to-height 2000
```
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64
tags: |
ghcr.io/cogwheel-validator:${{ steps.version.outputs.version }}
ghcr.io/cogwheel-validator:${{ steps.version.outputs.docker_tag }}
build-args: |
VERSION=${{ steps.version.outputs.version }}
cache-from: type=gha
cache-to: type=gha,mode=max