Skip to content

Commit

Permalink
Merge pull request #18 from xypwn/actions-testbed
Browse files Browse the repository at this point in the history
Ditch go-release-action
  • Loading branch information
xypwn authored Jan 13, 2025
2 parents 1d6f840 + 179deec commit 044401e
Showing 1 changed file with 38 additions and 22 deletions.
60 changes: 38 additions & 22 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,41 +11,57 @@ jobs:
name: Release Linux Binary
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: wangyoucao577/go-release-action@v1
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '>=1.20'
- name: Prepare archive directory
run: |
mkdir filediver
cp README.md LICENSE filediver/
- name: Build Executable
run: GOOS=linux GOARCH=amd64 go build -o filediver/filediver ./cmd/filediver-cli
- name: Create archive
run: zip -r filediver-linux-amd64.zip filediver/
- name: Upload archive
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: linux
goarch: amd64
ldflags: -s -w
project_path: "./cmd/filediver-cli"
binary_name: "filediver"
asset_name: "filediver-linux-amd64"
extra_files: LICENSE README.md
files: filediver-linux-amd64.zip

release-windows:
name: Release Windows Binary
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '>=1.20'
- name: Prepare archive directory
run: |
mkdir filediver
cp README.md LICENSE filediver/
- name: Build Executable
run: GOOS=windows GOARCH=amd64 go build -o filediver/filediver.exe ./cmd/filediver-cli
- name: Download FFmpeg binary
run: |
wget https://github.com/GyanD/codexffmpeg/releases/download/6.1.1/ffmpeg-6.1.1-essentials_build.zip
unzip ffmpeg-6.1.1-essentials_build.zip ffmpeg-6.1.1-essentials_build/bin/ffmpeg.exe
mv ffmpeg-6.1.1-essentials_build/bin/ffmpeg.exe .
- name: Build Go binary and upload
uses: wangyoucao577/go-release-action@v1
mv ffmpeg-6.1.1-essentials_build/bin/ffmpeg.exe filediver/
- name: Create archive
run: zip -r filediver-windows-amd64.zip filediver/
- name: Upload archive
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: windows
goarch: amd64
ldflags: -s -w
project_path: "./cmd/filediver-cli"
binary_name: "filediver"
asset_name: "filediver-windows-amd64"
extra_files: LICENSE README.md ffmpeg.exe
files: filediver-windows-amd64.zip

release-scripts-dist-windows:
name: Release Helper Scripts (Windows)
runs-on: windows-latest
steps:
- name: Checkout
Expand Down

0 comments on commit 044401e

Please sign in to comment.