mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
feature: add github release flow for dnum
This commit is contained in:
parent
ed94b8a8d8
commit
570d0f077c
72
.github/workflows/release.yml
vendored
72
.github/workflows/release.yml
vendored
|
@ -119,3 +119,75 @@ jobs:
|
|||
asset_path: dist/${{ steps.get_version.outputs.VERSION }}/bbgo-${{ steps.get_version.outputs.VERSION }}-darwin-arm64.tar.gz
|
||||
asset_name: bbgo-${{ steps.get_version.outputs.VERSION }}-darwin-arm64.tar.gz
|
||||
asset_content_type: application/octet-stream
|
||||
- name: Upload slim Linux amd64 dnum
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: dist/${{ steps.get_version.outputs.VERSION }}/bbgo-slim-dnum-${{ steps.get_version.outputs.VERSION }}-linux-amd64.tar.gz
|
||||
asset_name: bbgo-slim-dnum-${{ steps.get_version.outputs.VERSION }}-linux-amd64.tar.gz
|
||||
asset_content_type: application/octet-stream
|
||||
- name: Upload slim Linux arm64 dnum
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: dist/${{ steps.get_version.outputs.VERSION }}/bbgo-slim-dnum-${{ steps.get_version.outputs.VERSION }}-linux-arm64.tar.gz
|
||||
asset_name: bbgo-slim-dnum-${{ steps.get_version.outputs.VERSION }}-linux-arm64.tar.gz
|
||||
asset_content_type: application/octet-stream
|
||||
- name: Upload slim Darwin amd64 dnum
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: dist/${{ steps.get_version.outputs.VERSION }}/bbgo-slim-dnum-${{ steps.get_version.outputs.VERSION }}-darwin-amd64.tar.gz
|
||||
asset_name: bbgo-slim-dnum-${{ steps.get_version.outputs.VERSION }}-darwin-amd64.tar.gz
|
||||
asset_content_type: application/octet-stream
|
||||
- name: Upload slim Darwin arm64 dnum
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: dist/${{ steps.get_version.outputs.VERSION }}/bbgo-slim-dnum-${{ steps.get_version.outputs.VERSION }}-darwin-arm64.tar.gz
|
||||
asset_name: bbgo-slim-dnum-${{ steps.get_version.outputs.VERSION }}-darwin-arm64.tar.gz
|
||||
asset_content_type: application/octet-stream
|
||||
- name: Upload Linux amd64 dnum
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: dist/${{ steps.get_version.outputs.VERSION }}/bbgo-dnum-${{ steps.get_version.outputs.VERSION }}-linux-amd64.tar.gz
|
||||
asset_name: bbgo-dnum-${{ steps.get_version.outputs.VERSION }}-linux-amd64.tar.gz
|
||||
asset_content_type: application/octet-stream
|
||||
- name: Upload Linux arm64 dnum
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: dist/${{ steps.get_version.outputs.VERSION }}/bbgo-dnum-${{ steps.get_version.outputs.VERSION }}-linux-arm64.tar.gz
|
||||
asset_name: bbgo-dnum-${{ steps.get_version.outputs.VERSION }}-linux-arm64.tar.gz
|
||||
asset_content_type: application/octet-stream
|
||||
- name: Upload Darwin amd64 dnum
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: dist/${{ steps.get_version.outputs.VERSION }}/bbgo-dnum-${{ steps.get_version.outputs.VERSION }}-darwin-amd64.tar.gz
|
||||
asset_name: bbgo-dnum-${{ steps.get_version.outputs.VERSION }}-darwin-amd64.tar.gz
|
||||
asset_content_type: application/octet-stream
|
||||
- name: Upload Darwin arm64 dnum
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: dist/${{ steps.get_version.outputs.VERSION }}/bbgo-dnum-${{ steps.get_version.outputs.VERSION }}-darwin-arm64.tar.gz
|
||||
asset_name: bbgo-dnum-${{ steps.get_version.outputs.VERSION }}-darwin-arm64.tar.gz
|
||||
asset_content_type: application/octet-stream
|
||||
|
|
67
Makefile
67
Makefile
|
@ -65,6 +65,48 @@ bbgo-slim-darwin-amd64: $(BIN_DIR)
|
|||
|
||||
bbgo-slim-darwin: bbgo-slim-darwin-amd64 bbgo-slim-darwin-arm64
|
||||
|
||||
# build native bbgo
|
||||
bbgo-dnum: static
|
||||
go build -tags web,release,dnum -o $(BIN_DIR)/bbgo ./cmd/bbgo
|
||||
|
||||
# build native bbgo (slim version)
|
||||
bbgo-slim-dnum:
|
||||
go build -tags release,dnum -o $(BIN_DIR)/$@ ./cmd/bbgo
|
||||
|
||||
# build cross-compile linux bbgo
|
||||
bbgo-dnum-linux: bbgo-dnum-linux-amd64 bbgo-dnum-linux-arm64
|
||||
|
||||
bbgo-dnum-linux-amd64: $(BIN_DIR) pkg/server/assets.go
|
||||
GOOS=linux GOARCH=amd64 go build -tags web,release,dnum -o $(BIN_DIR)/$@ ./cmd/bbgo
|
||||
|
||||
bbgo-dnum-linux-arm64: $(BIN_DIR) pkg/server/assets.go
|
||||
GOOS=linux GOARCH=arm64 go build -tags web,release,dnum -o $(BIN_DIR)/$@ ./cmd/bbgo
|
||||
|
||||
# build cross-compile linux bbgo (slim version)
|
||||
bbgo-slim-dnum-linux: bbgo-slim-dnum-linux-amd64 bbgo-slim-dnum-linux-arm64
|
||||
|
||||
bbgo-slim-dnum-linux-amd64: $(BIN_DIR)
|
||||
GOOS=linux GOARCH=amd64 go build -tags release,dnum -o $(BIN_DIR)/$@ ./cmd/bbgo
|
||||
|
||||
bbgo-slim-dnum-linux-arm64: $(BIN_DIR)
|
||||
GOOS=linux GOARCH=arm64 go build -tags release,dnum -o $(BIN_DIR)/$@ ./cmd/bbgo
|
||||
|
||||
bbgo-dnum-darwin: bbgo-dnum-darwin-arm64 bbgo-dnum-darwin-amd64
|
||||
|
||||
bbgo-dnum-darwin-arm64: $(BIN_DIR) pkg/server/assets.go
|
||||
GOOS=darwin GOARCH=arm64 go build -tags web,release,dnum -o $(BIN_DIR)/$@ ./cmd/bbgo
|
||||
|
||||
bbgo-dnum-darwin-amd64: $(BIN_DIR) pkg/server/assets.go
|
||||
GOOS=darwin GOARCH=amd64 go build -tags web,release,dnum -o $(BIN_DIR)/$@ ./cmd/bbgo
|
||||
|
||||
bbgo-slim-dnum-darwin-arm64: $(BIN_DIR)
|
||||
GOOS=darwin GOARCH=arm64 go build -tags release,dnum -o $(BIN_DIR)/$@ ./cmd/bbgo
|
||||
|
||||
bbgo-slim-dnum-darwin-amd64: $(BIN_DIR)
|
||||
GOOS=darwin GOARCH=amd64 go build -tags release,dnum -o $(BIN_DIR)/$@ ./cmd/bbgo
|
||||
|
||||
bbgo-slim-dnum-darwin: bbgo-slim-dnum-darwin-amd64 bbgo-slim-dnum-darwin-arm64
|
||||
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILD_DIR) $(DIST_DIR) $(FRONTEND_EXPORT_DIR)
|
||||
|
@ -108,17 +150,37 @@ ifeq ($(SIGN),1)
|
|||
gpg --yes --detach-sign --armor $@
|
||||
endif
|
||||
|
||||
$(DIST_DIR)/$(VERSION)/bbgo-slim-dnum-$(VERSION)-%.tar.gz: bbgo-slim-dnum-% $(DIST_DIR)/$(VERSION)
|
||||
tar -C $(BIN_DIR) -cvzf $@ $<
|
||||
ifeq ($(SIGN),1)
|
||||
gpg --yes --detach-sign --armor $@
|
||||
endif
|
||||
|
||||
$(DIST_DIR)/$(VERSION)/bbgo-dnum-$(VERSION)-%.tar.gz: bbgo-dnum-% $(DIST_DIR)/$(VERSION)
|
||||
tar -C $(BIN_DIR) -cvzf $@ $<
|
||||
ifeq ($(SIGN),1)
|
||||
gpg --yes --detach-sign --armor $@
|
||||
endif
|
||||
|
||||
dist-bbgo-linux: \
|
||||
$(DIST_DIR)/$(VERSION)/bbgo-$(VERSION)-linux-arm64.tar.gz \
|
||||
$(DIST_DIR)/$(VERSION)/bbgo-$(VERSION)-linux-amd64.tar.gz \
|
||||
$(DIST_DIR)/$(VERSION)/bbgo-slim-$(VERSION)-linux-arm64.tar.gz \
|
||||
$(DIST_DIR)/$(VERSION)/bbgo-slim-$(VERSION)-linux-amd64.tar.gz
|
||||
$(DIST_DIR)/$(VERSION)/bbgo-slim-$(VERSION)-linux-amd64.tar.gz \
|
||||
$(DIST_DIR)/$(VERSION)/bbgo-dnum-$(VERSION)-linux-arm64.tar.gz \
|
||||
$(DIST_DIR)/$(VERSION)/bbgo-dnum-$(VERSION)-linux-amd64.tar.gz \
|
||||
$(DIST_DIR)/$(VERSION)/bbgo-slim-dnum-$(VERSION)-linux-arm64.tar.gz \
|
||||
$(DIST_DIR)/$(VERSION)/bbgo-slim-dnum-$(VERSION)-linux-amd64.tar.gz
|
||||
|
||||
dist-bbgo-darwin: \
|
||||
$(DIST_DIR)/$(VERSION)/bbgo-$(VERSION)-darwin-arm64.tar.gz \
|
||||
$(DIST_DIR)/$(VERSION)/bbgo-$(VERSION)-darwin-amd64.tar.gz \
|
||||
$(DIST_DIR)/$(VERSION)/bbgo-slim-$(VERSION)-darwin-arm64.tar.gz \
|
||||
$(DIST_DIR)/$(VERSION)/bbgo-slim-$(VERSION)-darwin-amd64.tar.gz
|
||||
$(DIST_DIR)/$(VERSION)/bbgo-slim-$(VERSION)-darwin-amd64.tar.gz \
|
||||
$(DIST_DIR)/$(VERSION)/bbgo-dnum-$(VERSION)-darwin-arm64.tar.gz \
|
||||
$(DIST_DIR)/$(VERSION)/bbgo-dnum-$(VERSION)-darwin-amd64.tar.gz \
|
||||
$(DIST_DIR)/$(VERSION)/bbgo-slim-dnum-$(VERSION)-darwin-arm64.tar.gz \
|
||||
$(DIST_DIR)/$(VERSION)/bbgo-slim-dnum-$(VERSION)-darwin-amd64.tar.gz
|
||||
|
||||
dist: static dist-bbgo-linux dist-bbgo-darwin desktop
|
||||
|
||||
|
@ -180,4 +242,3 @@ protobuf:
|
|||
|
||||
protobuf-py:
|
||||
python -m grpc_tools.protoc -I$(PWD)/pkg/pb --python_out=$(PWD)/python/bbgo --grpc_python_out=$(PWD)/python/bbgo $(PWD)/pkg/pb/bbgo.proto
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user