mirror of
https://github.com/kubevela/kubevela.git
synced 2026-05-06 01:17:09 +00:00
109 lines
4.1 KiB
YAML
109 lines
4.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: 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: Get the version
|
|
id: get_version
|
|
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
|
|
- 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
|
|
- name: Publish to Github Docker Package Registry
|
|
uses: elgohr/Publish-Docker-Github-Action@2.21
|
|
with:
|
|
name: oam-dev/kubevela/vela-core
|
|
username: $GITHUB_ACTOR
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
registry: docker.pkg.github.com
|
|
tags: "${{ steps.get_version.outputs.VERSION }}"
|
|
- name: Publish to Docker Hub Registry
|
|
uses: elgohr/Publish-Docker-Github-Action@2.21
|
|
with:
|
|
name: oamdev/vela-core
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
tags: "${{ steps.get_version.outputs.VERSION }}" |