Skip to content

first commit

first commit #1

Workflow file for this run

name: Build and Release
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Build Linux binary
run: GOOS=linux GOARCH=amd64 go build -o smartadapter-linux main.go
- name: Build Windows binary
run: GOOS=windows GOARCH=amd64 go build -o smartadapter-windows.exe main.go
- name: Upload binaries to release
uses: softprops/action-gh-release@v2
with:
files: |
smartadapter-linux
smartadapter-windows.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
docker:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker image
run: docker build -t ghcr.io/kalvadtech/smartadapter:${{ github.ref_name }} .
- name: Push Docker image
run: docker push ghcr.io/kalvadtech/smartadapter:${{ github.ref_name }}