-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update release workflow and install.sh
- Loading branch information
1 parent
949b4ff
commit 4a2be38
Showing
2 changed files
with
78 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,31 +6,30 @@ on: | |
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
include: | ||
- os: windows-latest | ||
artifact_name: windows | ||
- os: ubuntu-latest | ||
artifact_name: linux | ||
- os: macos-latest | ||
artifact_name: macos | ||
runs-on: ${{ matrix.os }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: pip install -r requirements.txt | ||
- name: Build binary | ||
run: pyinstaller --onefile gpt_cmd.py | ||
- name: Upload artifact | ||
go-version: '1.22' | ||
- name: Build binaries | ||
run: | | ||
GOOS=linux GOARCH=386 go build -o bin/gpt_cmd-linux-386 | ||
GOOS=linux GOARCH=amd64 go build -o bin/gpt_cmd-linux | ||
GOOS=linux GOARCH=arm go build -o bin/gpt_cmd-linux-arm | ||
GOOS=linux GOARCH=arm64 go build -o bin/gpt_cmd-linux-arm64 | ||
GOOS=darwin GOARCH=amd64 go build -o bin/gpt_cmd-macos-amd64 | ||
GOOS=darwin GOARCH=arm64 go build -o bin/gpt_cmd-macos-arm64 | ||
GOOS=windows GOARCH=386 go build -o bin/gpt_cmd-windows-386.exe | ||
GOOS=windows GOARCH=amd64 go build -o bin/gpt_cmd-windows.exe | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.artifact_name }} | ||
path: 'dist/gpt_cmd*' | ||
name: binaries | ||
path: bin/* | ||
retention-days: 1 | ||
|
||
release: | ||
|
@@ -42,23 +41,9 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
- name: Rename artifacts | ||
run: | | ||
mkdir -p bin | ||
for os in windows linux macos; do | ||
ext="" | ||
if [ "$os" = "windows" ]; then | ||
ext=".exe" | ||
fi | ||
src="${os}/gpt_cmd${ext}" | ||
dest="bin/gpt_cmd-${os}${ext}" | ||
echo "Moving $src to $dest" | ||
mv "$src" "$dest" | ||
rm -rf "${os}/" | ||
done | ||
with: | ||
name: binaries | ||
- name: Create release | ||
uses: ncipollo/[email protected] | ||
with: | ||
artifacts: 'bin/gpt_cmd*' | ||
artifacts: 'bin/*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters