Compare commits

...

3 Commits

Author SHA1 Message Date
天元
edce904df6 fix create release workflow 2020-09-11 00:30:39 +08:00
Sun Jianbo
159ca172bf Merge pull request #258 from wonderflow/fixci
fix release workflow
2020-09-11 00:12:20 +08:00
天元
f1497c3fc2 fix release workflow 2020-09-11 00:10:46 +08:00
3 changed files with 28 additions and 19 deletions

View File

@@ -1,19 +1,17 @@
name: Release
on:
release:
types: [published]
branches:
- master
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
- "v*"
jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
VELA_VERSION: ${{ github.ref }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
@@ -22,16 +20,18 @@ jobs:
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
ref: 'master'
- name: Use Node.js 10.x
uses: actions/setup-node@v1
with:
node-version: 10.x
- run: npm install
working-directory: ./dashboard
- name: Run Make Realse
run: make release
- name: Run npm install
run: make npm-install
- name: Run npm build
run: make npm-build
- name: Run generate-source
run: make generate-source
- name: Run cross-build
run: make cross-build
- name: Create Release
id: create_release
uses: actions/create-release@v1
@@ -43,19 +43,19 @@ jobs:
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bin/vela-linux-amd64
asset_name: vela-${{ github.event.release.tag_name }}-linux-amd64
asset_name: vela-${{ github.ref }}-linux-amd64
asset_content_type: binary/octet-stream
- name: Upload MacOS
uses: actions/upload-release-asset@v1.0.2
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bin/vela-darwin-amd64
asset_name: vela-${{ github.event.release.tag_name }}-darwin-amd64
asset_name: vela-${{ github.ref }}-darwin-amd64
asset_content_type: binary/octet-stream
- name: Upload Windows
uses: actions/upload-release-asset@v1.0.2
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bin/vela--windows-amd64
asset_name: vela-${{ github.event.release.tag_name }}-windows-amd64
asset_path: ./bin/vela-windows-amd64.exe
asset_name: vela-${{ github.ref }}-windows-amd64.exe
asset_content_type: binary/octet-stream

View File

@@ -26,11 +26,18 @@ test: fmt vet lint
build: fmt vet lint
go build -o bin/vela -ldflags ${LDFLAGS} cmd/vela/main.go
release: fmt vet lint
# TODO: build vela core chart into vela binary
npm-build:
cd dashboard && npm run build && cd ./..
npm-install:
cd dashboard && npm install && cd ./..
generate-source:
go run hack/frontend/source.go
GO111MODULE=on CGO_ENABLED=0 $(GOX) -ldflags $(LDFLAGS) -parallel=3 -output="bin/vela-{{.OS}}-{{.Arch}}" -osarch='$(TARGETS)' cmd/vela/main.go
cross-build:
# TODO: build vela core chart into vela binary
GO111MODULE=on CGO_ENABLED=0 $(GOX) -ldflags $(LDFLAGS) -parallel=3 -output="bin/vela-{{.OS}}-{{.Arch}}" -osarch='$(TARGETS)' ./cmd/vela/
# Run against the configured Kubernetes cluster in ~/.kube/config
run: fmt vet

2
go.sum
View File

@@ -863,8 +863,10 @@ github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4=
github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
github.com/mitchellh/gox v0.4.0 h1:lfGJxY7ToLJQjHHwi0EX6uYBdK78egf954SQl13PQJc=
github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ=
github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY=
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=