mirror of
https://github.com/kubevela/kubevela.git
synced 2026-05-09 02:47:04 +00:00
85 lines
3.4 KiB
YAML
85 lines
3.4 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
workflow_dispatch: {}
|
|
|
|
jobs:
|
|
publish-cli:
|
|
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: 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 cross-build
|
|
run: make cross-build
|
|
- name: Run compress binary
|
|
run: make compress
|
|
- name: Get release
|
|
id: get_release
|
|
uses: bruceadams/get-release@v1.2.2
|
|
- name: Upload Linux amd64 tar.gz
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
with:
|
|
upload_url: ${{ steps.get_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 amd64 zip
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
with:
|
|
upload_url: ${{ steps.get_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.get_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.get_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.get_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.get_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.get_release.outputs.upload_url }}
|
|
asset_path: ./_bin/sha256sums.txt
|
|
asset_name: sha256sums.txt
|
|
asset_content_type: text/plain |