mirror of
https://github.com/kubevela/kubevela.git
synced 2026-05-10 19:36:46 +00:00
64 lines
2.1 KiB
YAML
64 lines
2.1 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "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
|
|
with:
|
|
go-version: 1.13
|
|
id: go
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v2
|
|
- name: Use Node.js 10.x
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 10.x
|
|
- 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
|
|
with:
|
|
tag_name: ${{ github.ref }}
|
|
release_name: Release ${{ github.ref }}
|
|
- name: Get the version
|
|
id: get_version
|
|
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
|
|
- name: Upload Linux
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./bin/vela-linux-amd64
|
|
asset_name: vela-${{ steps.get_version.outputs.VERSION }}-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-${{ steps.get_version.outputs.VERSION }}-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.exe
|
|
asset_name: vela-${{ steps.get_version.outputs.VERSION }}-windows-amd64.exe
|
|
asset_content_type: binary/octet-stream |