Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@ name: Build

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main","*" ]

jobs:

build:
build-go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.24'
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.24'

- name: Build
run: go build -v ./...
- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...
- name: Test
run: go test -v ./...
74 changes: 74 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Release

on:
push:
tags:
- "v*.*.*"
workflow_dispatch:

jobs:
release-binaries:
name: Generate cross-platform builds
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Generate build files
uses: thatisuday/go-cross-build@v1
with:
platforms: |
linux/amd64,
linux/386,
linux/ppc64,
linux/ppc64le,
linux/mips64,
linux/mips64le,
darwin/amd64,
windows/amd64,
windows/386,
freebsd/amd64,
netbsd/amd64,
openbsd/amd64,
dragonfly/amd64,
plan9/amd64,
plan9/386,
solaris/amd64
package: ""
name: "pulse-bridge"
compress: "false"
dest: "dist"

build-and-push-docker-image:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GitHub Container Registry (GHCR)
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract semver version
id: extract_version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT

- name: Build and push Docker image with GHA cache
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ghcr.io/${{ github.repository_owner }}/pulse-bridge:${{ steps.extract_version.outputs.VERSION }}
cache-from: type=gha
cache-to: type=gha,mode=max