Release
This commit is contained in:
61
.github/workflows/release.yml
vendored
61
.github/workflows/release.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Build release binaries
|
||||
name: Build & Release
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -12,7 +12,7 @@ env:
|
||||
BINARY_NAME: streamed-tui
|
||||
|
||||
jobs:
|
||||
release:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
@@ -23,72 +23,39 @@ jobs:
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
cache: false
|
||||
cache: true
|
||||
|
||||
- name: Set up Node.js (required for Puppeteer bundling)
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20"
|
||||
|
||||
#
|
||||
# --- BUILD NODE MODULES (puppeteer-extra, stealth, puppeteer) ---
|
||||
#
|
||||
- name: Build bundled Node.js dependencies
|
||||
run: |
|
||||
chmod +x scripts/build_node_modules.sh
|
||||
scripts/build_node_modules.sh
|
||||
|
||||
#
|
||||
# --- BUILD LINUX AMD64 ---
|
||||
#
|
||||
- name: Build linux amd64
|
||||
- name: Build Linux amd64
|
||||
run: |
|
||||
mkdir -p out
|
||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 \
|
||||
go build -o out/${BINARY_NAME}_linux_amd64 .
|
||||
|
||||
#
|
||||
# --- BUILD LINUX ARM64 ---
|
||||
#
|
||||
- name: Build linux arm64
|
||||
- name: Build Linux arm64
|
||||
run: |
|
||||
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 \
|
||||
go build -o out/${BINARY_NAME}_linux_arm64 .
|
||||
|
||||
#
|
||||
# --- BUILD MACOS AMD64 ---
|
||||
#
|
||||
- name: Build darwin amd64
|
||||
- name: Build macOS amd64
|
||||
run: |
|
||||
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 \
|
||||
go build -o out/${BINARY_NAME}_darwin_amd64 .
|
||||
|
||||
#
|
||||
# --- BUILD MACOS ARM64 ---
|
||||
#
|
||||
- name: Build darwin arm64
|
||||
- name: Build macOS arm64
|
||||
run: |
|
||||
GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 \
|
||||
go build -o out/${BINARY_NAME}_darwin_arm64 .
|
||||
|
||||
#
|
||||
# --- BUILD SOURCE TARBALL ---
|
||||
#
|
||||
- name: Create source tarball
|
||||
run: |
|
||||
mkdir -p release
|
||||
git archive --format=tar.gz \
|
||||
--output=release/${BINARY_NAME}_${{ github.ref_name }}_source.tar.gz HEAD
|
||||
tar -czf release/${BINARY_NAME}_${GITHUB_REF_NAME}_source.tar.gz .
|
||||
|
||||
#
|
||||
# --- UPLOAD RELEASE ASSETS ---
|
||||
#
|
||||
- name: Upload release assets
|
||||
- name: Publish GitHub Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
out/${{ env.BINARY_NAME }}_linux_amd64
|
||||
out/${{ env.BINARY_NAME }}_linux_arm64
|
||||
out/${{ env.BINARY_NAME }}_darwin_amd64
|
||||
out/${{ env.BINARY_NAME }}_darwin_arm64
|
||||
release/${{ env.BINARY_NAME }}_${{ github.ref_name }}_source.tar.gz
|
||||
tag_name: ${{ github.ref_name }}
|
||||
name: ${{ github.ref_name }}
|
||||
make_release: true
|
||||
make_latest: true
|
||||
generate_release_notes: true
|
||||
|
||||
Reference in New Issue
Block a user