mirror of
https://github.com/kubevela/kubevela.git
synced 2026-05-06 01:17:09 +00:00
98 lines
3.8 KiB
YAML
98 lines
3.8 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.14
|
|
uses: actions/setup-go@v1
|
|
with:
|
|
go-version: 1.14
|
|
id: go
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v2
|
|
- name: Get the version
|
|
id: get_version
|
|
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
|
|
- name: Use Node.js 10.x
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 12.x
|
|
- name: Run dashboard install
|
|
run: make dashboard-install
|
|
- name: Run dashboard build
|
|
run: make dashboard-build
|
|
- name: Tag helm chart image
|
|
run: |
|
|
sed -i 's/latest/${{ steps.get_version.outputs.VERSION }}/g' charts/vela-core/values.yaml
|
|
sed -i 's/0.1.0/${{ steps.get_version.outputs.VERSION }}/g' charts/vela-core/Chart.yaml
|
|
- name: Run generate-source
|
|
run: make generate-source
|
|
- name: Run cross-build
|
|
run: make cross-build
|
|
- name: Run compress binary
|
|
run: make compress
|
|
- name: Create Release
|
|
id: create_release
|
|
uses: actions/create-release@v1
|
|
with:
|
|
tag_name: ${{ github.ref }}
|
|
release_name: Release ${{ github.ref }}
|
|
- name: Upload Linux tar.gz
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./_bin/vela-linux-amd64.tar.gz
|
|
asset_name: vela-${{ steps.get_version.outputs.VERSION }}-linux-amd64.tar.gz
|
|
asset_content_type: binary/octet-stream
|
|
- name: Upload Linux zip
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./_bin/vela-linux-amd64.zip
|
|
asset_name: vela-${{ steps.get_version.outputs.VERSION }}-linux-amd64.zip
|
|
asset_content_type: binary/octet-stream
|
|
- name: Upload MacOS tar.gz
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./_bin/vela-darwin-amd64.tar.gz
|
|
asset_name: vela-${{ steps.get_version.outputs.VERSION }}-darwin-amd64.tar.gz
|
|
asset_content_type: binary/octet-stream
|
|
- name: Upload MacOS zip
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./_bin/vela-darwin-amd64.zip
|
|
asset_name: vela-${{ steps.get_version.outputs.VERSION }}-darwin-amd64.zip
|
|
asset_content_type: binary/octet-stream
|
|
- name: Upload Windows tar.gz
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./_bin/vela-windows-amd64.tar.gz
|
|
asset_name: vela-${{ steps.get_version.outputs.VERSION }}-windows-amd64.tar.gz
|
|
asset_content_type: binary/octet-stream
|
|
- name: Upload Windows zip
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./_bin/vela-windows-amd64.zip
|
|
asset_name: vela-${{ steps.get_version.outputs.VERSION }}-windows-amd64.zip
|
|
asset_content_type: binary/octet-stream
|
|
- name: Upload Checksums
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./_bin/sha256sums.txt
|
|
asset_name: sha256sums.txt
|
|
asset_content_type: text/plain |