|
|
@@ -104,38 +104,18 @@ jobs:
|
|
|
zip --junk-paths ./release/linux/porter_${{steps.tag_name.outputs.tag}}_Linux_x86_64.zip ./porter
|
|
|
zip --junk-paths ./release/linux/portersvr_${{steps.tag_name.outputs.tag}}_Linux_x86_64.zip ./portersvr
|
|
|
zip --junk-paths ./release/linux/docker-credential-porter_${{steps.tag_name.outputs.tag}}_Linux_x86_64.zip ./docker-credential-porter
|
|
|
- - name: Build Darwin binaries
|
|
|
+ - name: Build and zip Darwin binaries
|
|
|
run: |
|
|
|
- go build -ldflags="-w -s -X 'github.com/porter-dev/porter/cli/cmd.Version=${{steps.tag_name.outputs.tag}}'" -a -tags cli -o ./porter ./cli &
|
|
|
- go build -ldflags="-w -s -X 'main.Version=${{steps.tag_name.outputs.tag}}'" -a -o ./docker-credential-porter ./cmd/docker-credential-porter/ &
|
|
|
- go build -ldflags="-w -s" -a -o ./portersvr ./cmd/app/ &
|
|
|
- wait
|
|
|
- env:
|
|
|
- GOOS: darwin
|
|
|
- GOARCH: amd64
|
|
|
- CGO_ENABLED: 1
|
|
|
- - name: Zip Darwin binaries
|
|
|
- run: |
|
|
|
- mkdir -p ./release/darwin
|
|
|
- zip --junk-paths ./release/darwin/UNSIGNED_porter_${{steps.tag_name.outputs.tag}}_Darwin_x86_64.zip ./porter
|
|
|
- zip --junk-paths ./release/darwin/UNSIGNED_portersvr_${{steps.tag_name.outputs.tag}}_Darwin_x86_64.zip ./portersvr
|
|
|
- zip --junk-paths ./release/darwin/UNSIGNED_docker-credential-porter_${{steps.tag_name.outputs.tag}}_Darwin_x86_64.zip ./docker-credential-porter
|
|
|
- - name: Build Windows binaries
|
|
|
- run: |
|
|
|
- go build -ldflags="-w -s -X 'github.com/porter-dev/porter/cli/cmd.Version=${{steps.tag_name.outputs.tag}}'" -a -tags cli -o ./porter.exe ./cli &
|
|
|
- go build -ldflags="-w -s -X 'main.Version=${{steps.tag_name.outputs.tag}}'" -a -o ./docker-credential-porter.exe ./cmd/docker-credential-porter/ &
|
|
|
- go build -ldflags="-w -s" -a -o ./portersvr.exe ./cmd/app/ &
|
|
|
- wait
|
|
|
- env:
|
|
|
- GOOS: windows
|
|
|
- GOARCH: amd64
|
|
|
- CGO_ENABLED: 1
|
|
|
- - name: Zip Windows binaries
|
|
|
+ docker build . --file ./build/Dockerfile.osx -t osx
|
|
|
+ docker run \
|
|
|
+ --mount type=bind,source="$(pwd)"/release,target=/release \
|
|
|
+ osx:latest ${{steps.tag_name.outputs.tag}}
|
|
|
+ - name: Build and zip Windows binaries
|
|
|
run: |
|
|
|
- mkdir -p ./release/windows
|
|
|
- zip --junk-paths ./release/windows/porter_${{steps.tag_name.outputs.tag}}_Windows_x86_64.zip ./porter.exe
|
|
|
- zip --junk-paths ./release/windows/portersvr_${{steps.tag_name.outputs.tag}}_Windows_x86_64.zip ./portersvr.exe
|
|
|
- zip --junk-paths ./release/windows/docker-credential-porter_${{steps.tag_name.outputs.tag}}_Windows_x86_64.zip ./docker-credential-porter.exe
|
|
|
+ docker build . --file ./build/Dockerfile.win -t win
|
|
|
+ docker run \
|
|
|
+ --mount type=bind,source="$(pwd)"/release,target=/release \
|
|
|
+ win:latest ${{steps.tag_name.outputs.tag}}
|
|
|
- name: Upload binaries
|
|
|
uses: actions/upload-artifact@v2
|
|
|
with:
|