Skip to content

Commit 07b759e

Browse files
committed
CI release builds.
1 parent 9397bf4 commit 07b759e

File tree

2 files changed

+69
-1
lines changed

2 files changed

+69
-1
lines changed

.github/workflows/release.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write # For creating releases
13+
strategy:
14+
matrix:
15+
os: [linux, windows, darwin]
16+
arch: [amd64, arm64]
17+
exclude:
18+
- os: darwin
19+
arch: arm64 # Optional: Skip if not needed
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Set up Go
24+
uses: actions/setup-go@v5
25+
with:
26+
go-version: '1.21' # Matches your README
27+
28+
- name: Build
29+
run: |
30+
GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -o ezff-${{ matrix.os }}-${{ matrix.arch }}${{ (matrix.os == 'windows') && '.exe' || '' }} .
31+
# Add -ldflags="-s -w" here for a smaller binary if desired
32+
33+
- name: Upload Assets
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: ezff-${{ matrix.os }}-${{ matrix.arch }}
37+
path: ezff-${{ matrix.os }}-${{ matrix.arch }}*
38+
39+
release:
40+
needs: build
41+
runs-on: ubuntu-latest
42+
permissions:
43+
contents: write
44+
steps:
45+
- uses: actions/download-artifact@v4
46+
with:
47+
path: artifacts
48+
49+
- name: Create Release
50+
uses: softprops/action-gh-release@v2
51+
with:
52+
files: |
53+
artifacts/ezff-*/ezff-*
54+
draft: false
55+
prerelease: false
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,22 @@ A minimal Go wrapper for FFmpeg to simplify common video trimming tasks via the
1818

1919
## Installation
2020

21+
1. Download the binary from [Releases](https://github.com/jantcu/ezff/releases)
22+
2. Move the binary to a directory in your PATH (e.g., `/usr/local/bin`)
23+
24+
<details>
25+
<summary>Or build from source</summary>
26+
27+
1. Clone the repository: `git clone git@github.com:jantcu/ezff.git`
28+
2. Run `go install` if your set up supports modules (see [Go docs](https://go.dev/doc/install) for details)
29+
30+
Or
31+
2132
1. Clone the repository: `git clone git@github.com:jantcu/ezff.git`
2233
2. Build the binary: `cd ezff && go build`
2334
3. Move the binary to a directory in your PATH (e.g., `/usr/local/bin`): `sudo mv ezff /usr/local/bin/`
2435

25-
Or instead of step 3, use `go install` if you structure it as a module (see [Go docs](https://go.dev/doc/install) for details).
36+
</details>
2637

2738
## Usage
2839

0 commit comments

Comments
 (0)