Merge branch 'main' of https://git.fluffy.pw/leafus/s3-client
All checks were successful
Release Version / build (push) Successful in 5m30s
All checks were successful
Release Version / build (push) Successful in 5m30s
This commit is contained in:
commit
cdaf3d081e
|
@ -18,71 +18,51 @@ jobs:
|
||||||
with:
|
with:
|
||||||
go-version: '1.23.1'
|
go-version: '1.23.1'
|
||||||
|
|
||||||
- name: Check if main.go was modified
|
|
||||||
id: check_main_go
|
|
||||||
run: |
|
|
||||||
git fetch origin main
|
|
||||||
if git diff --name-only HEAD origin/main | grep -q 'main.go'; then
|
|
||||||
echo "main_go_modified=true" >> $GITHUB_ENV
|
|
||||||
else
|
|
||||||
echo "main_go_modified=false" >> $GITHUB_ENV
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Build Go binary for Linux
|
- name: Build Go binary for Linux
|
||||||
if: env.main_go_modified == 'true'
|
|
||||||
run: |
|
run: |
|
||||||
go mod tidy
|
go mod tidy
|
||||||
go build -o s3-client_linux.x86_64
|
go build -o s3-client_linux.x86_64
|
||||||
|
|
||||||
- name: Build Go binary for Linux (x86)
|
- name: Build Go binary for Linux (x86)
|
||||||
if: env.main_go_modified == 'true'
|
|
||||||
run: |
|
run: |
|
||||||
go mod tidy
|
go mod tidy
|
||||||
GOARCH=386 go build -o s3-client_linux.x86
|
GOARCH=386 go build -o s3-client_linux.x86
|
||||||
|
|
||||||
- name: Build Go binary for Linux (ARM64)
|
- name: Build Go binary for Linux (ARM64)
|
||||||
if: env.main_go_modified == 'true'
|
|
||||||
run: |
|
run: |
|
||||||
go mod tidy
|
go mod tidy
|
||||||
GOARCH=arm64 go build -o s3-client_linux.arm64
|
GOARCH=arm64 go build -o s3-client_linux.arm64
|
||||||
|
|
||||||
- name: Build Go binary for Mac OS (x86_64)
|
- name: Build Go binary for Mac OS (x86_64)
|
||||||
if: env.main_go_modified == 'true'
|
|
||||||
run: |
|
run: |
|
||||||
go mod tidy
|
go mod tidy
|
||||||
GOOS=darwin GOARCH=386 go build -o s3-client_linux.x86
|
GOOS=darwin GOARCH=amd64 go build -o s3-client_darwin.x86_64.app
|
||||||
|
|
||||||
- name: Build Go binary for Mac OS (ARM64)
|
- name: Build Go binary for Mac OS (ARM64)
|
||||||
if: env.main_go_modified == 'true'
|
|
||||||
run: |
|
run: |
|
||||||
go mod tidy
|
go mod tidy
|
||||||
GOOS=darwin GOARCH=arm64 go build -o s3-client_linux.arm64
|
GOOS=darwin GOARCH=arm64 go build -o s3-client_darwin.arm64.app
|
||||||
|
|
||||||
- name: Build Go binary for Linux (ARMv7)
|
- name: Build Go binary for Linux (ARMv7)
|
||||||
if: env.main_go_modified == 'true'
|
|
||||||
run: |
|
run: |
|
||||||
go mod tidy
|
go mod tidy
|
||||||
GOARCH=arm go build -o s3-client_linux.armv7
|
GOARCH=arm go build -o s3-client_linux.armv7
|
||||||
|
|
||||||
- name: Build Go binary for Linux (RISC-V)
|
- name: Build Go binary for Linux (RISC-V)
|
||||||
if: env.main_go_modified == 'true'
|
|
||||||
run: |
|
run: |
|
||||||
go mod tidy
|
go mod tidy
|
||||||
GOARCH=riscv64 go build -o s3-client_linux.riscv64
|
GOARCH=riscv64 go build -o s3-client_linux.riscv64
|
||||||
|
|
||||||
- name: Build Go binary for Windows
|
- name: Build Go binary for Windows
|
||||||
if: env.main_go_modified == 'true'
|
|
||||||
run: |
|
run: |
|
||||||
GOOS=windows GOARCH=amd64 go build -o s3-client_windows.x86_64.exe
|
GOOS=windows GOARCH=amd64 go build -o s3-client_windows.x86_64.exe
|
||||||
|
|
||||||
- name: Build Go binary for Windows (x86)
|
- name: Build Go binary for Windows (x86)
|
||||||
if: env.main_go_modified == 'true'
|
|
||||||
run: |
|
run: |
|
||||||
go mod tidy
|
go mod tidy
|
||||||
GOOS=windows GOARCH=386 go build -o s3-client_windows.x86.exe
|
GOOS=windows GOARCH=386 go build -o s3-client_windows.x86.exe
|
||||||
|
|
||||||
- name: Build Go binary for Windows (ARM64)
|
- name: Build Go binary for Windows (ARM64)
|
||||||
if: env.main_go_modified == 'true'
|
|
||||||
run: |
|
run: |
|
||||||
go mod tidy
|
go mod tidy
|
||||||
GOOS=windows GOARCH=arm64 go build -o s3-client_windows.arm64.exe
|
GOOS=windows GOARCH=arm64 go build -o s3-client_windows.arm64.exe
|
||||||
|
@ -123,7 +103,6 @@ jobs:
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
id: create_release
|
id: create_release
|
||||||
if: env.main_go_modified == 'true'
|
|
||||||
uses: actions/create-release@v1
|
uses: actions/create-release@v1
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ env.new_version }}
|
tag_name: ${{ env.new_version }}
|
||||||
|
@ -139,7 +118,6 @@ jobs:
|
||||||
GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
||||||
|
|
||||||
- name: Upload Go binaries to release
|
- name: Upload Go binaries to release
|
||||||
if: env.main_go_modified == 'true'
|
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
|
@ -151,6 +129,8 @@ jobs:
|
||||||
./s3-client_windows.x86_64.exe
|
./s3-client_windows.x86_64.exe
|
||||||
./s3-client_windows.x86.exe
|
./s3-client_windows.x86.exe
|
||||||
./s3-client_windows.arm64.exe
|
./s3-client_windows.arm64.exe
|
||||||
|
./s3-client_darwin.x86_64.app
|
||||||
|
./s3-client_darwin.arm64.app
|
||||||
|
|
||||||
tag_name: ${{ env.new_version }}
|
tag_name: ${{ env.new_version }}
|
||||||
name: Release ${{ env.new_version }}
|
name: Release ${{ env.new_version }}
|
||||||
|
|
2
main.go
2
main.go
|
@ -45,7 +45,7 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if *configPath == "" {
|
if *configPath == "" {
|
||||||
fmt.Println("No config file found. Please specify a config file using --config or create one in the default locations.")
|
fmt.Println("No config file found. Please specify a config file using -config or create one in the default locations.")
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user