Compare commits
No commits in common. "7c14b59bb63ea062fbd0c9bbad716cf1d92de1a5" and "c6755cb58586e6294224df2f9a23df1d0379e086" have entirely different histories.
7c14b59bb6
...
c6755cb585
3 changed files with 18 additions and 59 deletions
2
.cz.toml
2
.cz.toml
|
@ -2,6 +2,6 @@
|
||||||
name = "cz_conventional_commits"
|
name = "cz_conventional_commits"
|
||||||
tag_format = "$version"
|
tag_format = "$version"
|
||||||
version_scheme = "semver2"
|
version_scheme = "semver2"
|
||||||
version = "0.4.0"
|
version = "0.3.0"
|
||||||
update_changelog_on_bump = true
|
update_changelog_on_bump = true
|
||||||
major_version_zero = true
|
major_version_zero = true
|
||||||
|
|
|
@ -21,26 +21,21 @@ jobs:
|
||||||
with:
|
with:
|
||||||
go-version: '1.21'
|
go-version: '1.21'
|
||||||
|
|
||||||
- name: Install gox and UPX
|
- name: Install UPX
|
||||||
run: |
|
run: |
|
||||||
go install github.com/mitchellh/gox@latest
|
|
||||||
wget -O upx.tar.xz https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-amd64_linux.tar.xz
|
wget -O upx.tar.xz https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-amd64_linux.tar.xz
|
||||||
tar -xf upx.tar.xz
|
tar -xf upx.tar.xz
|
||||||
cp upx-5.0.1-amd64_linux/upx /usr/local/bin/
|
cp upx-5.0.1-amd64_linux/upx /usr/local/bin/
|
||||||
cp upx-5.0.1-amd64_linux/upx.1 /usr/local/share/man/man1/ || true
|
cp upx-5.0.1-amd64_linux/upx.1 /usr/local/share/man/man1/ || true
|
||||||
chmod +x /usr/local/bin/upx
|
chmod +x /usr/local/bin/upx
|
||||||
|
|
||||||
- name: Build cross-platform binaries
|
- name: Build normal binary
|
||||||
run: |
|
run: |
|
||||||
gox -os="darwin" -os="linux" -os="windows" -arch="amd64" -arch="arm64" -osarch="linux/386" -osarch="windows/386" -output="build/{{.Dir}}-{{.OS}}-{{.Arch}}"
|
go build -o fps-go-brr .
|
||||||
|
|
||||||
- name: Compress Linux binaries with UPX
|
- name: Build compact binary
|
||||||
run: |
|
run: |
|
||||||
for file in build/*linux*; do
|
./build-compact.sh
|
||||||
if [ -f "$file" ]; then
|
|
||||||
upx --brute "$file"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Get version
|
- name: Get version
|
||||||
id: version
|
id: version
|
||||||
|
@ -51,56 +46,23 @@ jobs:
|
||||||
echo "version=dev-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
echo "version=dev-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Create platform bundles
|
- name: Create release directory
|
||||||
run: |
|
run: |
|
||||||
mkdir -p release
|
mkdir -p release
|
||||||
|
cp fps-go-brr release/fps-go-brr-${{ steps.version.outputs.version }}
|
||||||
|
cp fps-go-brr-compact release/fps-go-brr-compact-${{ steps.version.outputs.version }}
|
||||||
|
|
||||||
# Create Darwin (macOS) bundle
|
- name: Upload normal binary
|
||||||
mkdir -p bundle-darwin
|
|
||||||
cp build/fps-go-brr-darwin-amd64 bundle-darwin/ 2>/dev/null || true
|
|
||||||
cp build/fps-go-brr-darwin-arm64 bundle-darwin/ 2>/dev/null || true
|
|
||||||
if [ "$(ls -A bundle-darwin 2>/dev/null)" ]; then
|
|
||||||
tar -czf release/fps-go-brr-darwin-${{ steps.version.outputs.version }}.tar.gz -C bundle-darwin .
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Create Linux bundle
|
|
||||||
mkdir -p bundle-linux
|
|
||||||
cp build/fps-go-brr-linux-amd64 bundle-linux/ 2>/dev/null || true
|
|
||||||
cp build/fps-go-brr-linux-arm64 bundle-linux/ 2>/dev/null || true
|
|
||||||
cp build/fps-go-brr-linux-386 bundle-linux/ 2>/dev/null || true
|
|
||||||
if [ "$(ls -A bundle-linux 2>/dev/null)" ]; then
|
|
||||||
tar -czf release/fps-go-brr-linux-${{ steps.version.outputs.version }}.tar.gz -C bundle-linux .
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Create Windows bundle
|
|
||||||
mkdir -p bundle-windows
|
|
||||||
cp build/fps-go-brr-windows-amd64.exe bundle-windows/ 2>/dev/null || true
|
|
||||||
cp build/fps-go-brr-windows-arm64.exe bundle-windows/ 2>/dev/null || true
|
|
||||||
cp build/fps-go-brr-windows-386.exe bundle-windows/ 2>/dev/null || true
|
|
||||||
if [ "$(ls -A bundle-windows 2>/dev/null)" ]; then
|
|
||||||
tar -czf release/fps-go-brr-windows-${{ steps.version.outputs.version }}.tar.gz -C bundle-windows .
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Upload Darwin bundle
|
|
||||||
uses: forgejo/upload-artifact@v4
|
uses: forgejo/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: fps-go-brr-darwin-${{ steps.version.outputs.version }}
|
name: fps-go-brr-normal-${{ steps.version.outputs.version }}
|
||||||
path: release/fps-go-brr-darwin-${{ steps.version.outputs.version }}.tar.gz
|
path: release/fps-go-brr-${{ steps.version.outputs.version }}
|
||||||
if-no-files-found: ignore
|
|
||||||
|
|
||||||
- name: Upload Linux bundle
|
- name: Upload compact binary
|
||||||
uses: forgejo/upload-artifact@v4
|
uses: forgejo/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: fps-go-brr-linux-${{ steps.version.outputs.version }}
|
name: fps-go-brr-compact-${{ steps.version.outputs.version }}
|
||||||
path: release/fps-go-brr-linux-${{ steps.version.outputs.version }}.tar.gz
|
path: release/fps-go-brr-compact-${{ steps.version.outputs.version }}
|
||||||
if-no-files-found: ignore
|
|
||||||
|
|
||||||
- name: Upload Windows bundle
|
|
||||||
uses: forgejo/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: fps-go-brr-windows-${{ steps.version.outputs.version }}
|
|
||||||
path: release/fps-go-brr-windows-${{ steps.version.outputs.version }}.tar.gz
|
|
||||||
if-no-files-found: ignore
|
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
@ -113,8 +75,7 @@ jobs:
|
||||||
## fps-go-brr ${{ steps.version.outputs.version }}
|
## fps-go-brr ${{ steps.version.outputs.version }}
|
||||||
|
|
||||||
### Downloads
|
### Downloads
|
||||||
- `fps-go-brr-darwin-${{ steps.version.outputs.version }}.tar.gz` - macOS builds (amd64, arm64)
|
- `fps-go-brr-${{ steps.version.outputs.version }}` - Normal build
|
||||||
- `fps-go-brr-linux-${{ steps.version.outputs.version }}.tar.gz` - Linux builds (amd64, arm64, 386) - compressed with UPX
|
- `fps-go-brr-compact-${{ steps.version.outputs.version }}` - Compact build (optimized with UPX compression)
|
||||||
- `fps-go-brr-windows-${{ steps.version.outputs.version }}.tar.gz` - Windows builds (amd64, arm64, 386)
|
|
||||||
|
|
||||||
Linux binaries are compressed with UPX for smaller size but may have slightly slower startup time due to decompression.
|
The compact build is smaller but may have slightly slower startup time due to decompression.
|
|
@ -1,5 +1,3 @@
|
||||||
## 0.4.0 (2025-06-15)
|
|
||||||
|
|
||||||
## 0.3.0 (2025-06-15)
|
## 0.3.0 (2025-06-15)
|
||||||
|
|
||||||
### Refactor
|
### Refactor
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue