update releases workflow
add setup binaries to release
@@ -77,10 +77,49 @@ jobs:
path: bin/
retention-days: 1
+ setup:
+ name: Build Setup CLI Artifacts
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ goos:
+ - linux
+ - windows
+ - darwin
+ goarch:
+ - amd64
+ - arm64
+ steps:
+ - name: Set up Go
+ uses: actions/setup-go@v1
+ with:
+ go-version: '1.18rc1'
+ - name: Check out code
+ uses: actions/checkout@v2
+ - name: Get dependencies
+ run: go get -v ./...
+ - name: Build CLI (${{ matrix.goos }}-${{ matrix.goarch }})
+ env:
+ GOOS: ${{ matrix.goos }}
+ GOARCH: ${{ matrix.goarch }}
+ run: go build -o ./bin/setup-${{ matrix.goos }}-${{ matrix.goarch }} ./cmd/shinpuru/main.go
+ - name: Rename Windows Binary
+ if: ${{ matrix.goos == 'windows' }}
+ env:
+ FNAME: ./bin/setup-${{ matrix.goos }}-${{ matrix.goarch }}
+ run: mv ${{ env.FNAME }} ${{ env.FNAME }}.exe
+ - name: Upload Artifcats
+ uses: actions/upload-artifact@v2
+ with:
+ name: setup
+ path: bin/
+ retention-days: 1
+
deploy:
name: Deploy to Releases
runs-on: ubuntu-latest
needs:
+ - 'setup'
- 'backend'
steps:
- name: Checkout
@@ -90,6 +129,11 @@ jobs:
with:
name: backend
path: bin/
+ - name: Retrieve setup binaries
+ uses: actions/download-artifact@v2
+ with:
+ name: setup
+ path: bin/
- name: Inject Version into Changelog
run: |-
sed -i "s/\[VERSION\]/$(git describe --tags --abbrev=0)/g" CHANGELOG.md
