mirror of
https://github.com/kubevela/kubevela.git
synced 2026-05-06 17:37:09 +00:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](755da8c3cf...ac59398561)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
97 lines
3.6 KiB
YAML
97 lines
3.6 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
workflow_dispatch: { }
|
|
|
|
env:
|
|
BUCKET: ${{ secrets.CLI_OSS_BUCKET }}
|
|
ENDPOINT: ${{ secrets.CLI_OSS_ENDPOINT }}
|
|
ACCESS_KEY: ${{ secrets.CLI_OSS_ACCESS_KEY }}
|
|
ACCESS_KEY_SECRET: ${{ secrets.CLI_OSS_ACCESS_KEY_SECRET }}
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
permissions:
|
|
contents: write
|
|
actions: read
|
|
checks: write
|
|
issues: read
|
|
packages: write
|
|
pull-requests: read
|
|
repository-projects: read
|
|
statuses: read
|
|
runs-on: ubuntu-latest
|
|
name: goreleaser
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
|
with:
|
|
fetch-depth: 0
|
|
- run: git fetch --force --tags
|
|
- name: Set up Go
|
|
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
|
|
with:
|
|
go-version: 1.19
|
|
cache: true
|
|
- uses: goreleaser/goreleaser-action@9754a253a8673b0ea869c2e863b4e975497efd0c # v4.1.1
|
|
with:
|
|
distribution: goreleaser
|
|
version: 1.14.1
|
|
args: release --rm-dist --timeout 60m
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
# Since goreleaser haven't supported aliyun OSS, we need to upload the release manually
|
|
- name: Get version
|
|
run: echo "VELA_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
|
- name: Install ossutil
|
|
run: wget http://gosspublic.alicdn.com/ossutil/1.7.0/ossutil64 && chmod +x ossutil64 && mv ossutil64 ossutil
|
|
- name: Configure Alibaba Cloud OSSUTIL
|
|
run: ./ossutil --config-file .ossutilconfig config -i ${ACCESS_KEY} -k ${ACCESS_KEY_SECRET} -e ${ENDPOINT}
|
|
- name: split files to be upload
|
|
run: mkdir -p ./dist/files_upload && mv ./dist/*.tar.gz ./dist/files_upload && mv ./dist/*.zip ./dist/files_upload
|
|
- name: sync local to cloud
|
|
run: ./ossutil --config-file .ossutilconfig sync ./dist/files_upload oss://$BUCKET/binary/vela/${{ env.VELA_VERSION }}
|
|
- name: sync the latest version file
|
|
if: ${{ !contains(env.VELA_VERSION,'alpha') && !contains(env.VELA_VERSION,'beta') && !contains(env.VELA_VERSION,'rc') }}
|
|
run: |
|
|
LATEST_VERSION=$(curl -fsSl https://static.kubevela.net/binary/vela/latest_version)
|
|
verlte() {
|
|
[ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]
|
|
}
|
|
verlte ${{ env.VELA_VERSION }} $LATEST_VERSION && echo "${{ env.VELA_VERSION }} <= $LATEST_VERSION, skip update" && exit 0
|
|
echo ${{ env.VELA_VERSION }} > ./latest_version
|
|
./ossutil --config-file .ossutilconfig cp -u ./latest_version oss://$BUCKET/binary/vela/latest_version
|
|
upload-plugin-homebrew:
|
|
permissions:
|
|
contents: write
|
|
actions: read
|
|
checks: write
|
|
issues: read
|
|
packages: write
|
|
pull-requests: read
|
|
repository-projects: read
|
|
statuses: read
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
if: ${{ !contains(github.ref, 'alpha') && !contains(github.ref, 'beta') && !contains(github.ref, 'rc') }}
|
|
name: upload-sha256sums
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
|
- name: Update kubectl plugin version in krew-index
|
|
uses: rajatjindal/krew-release-bot@92da038bbf995803124a8e50ebd438b2f37bbbb0 # v0.0.43
|
|
- name: Update Homebrew formula
|
|
uses: dawidd6/action-homebrew-bump-formula@02e79d9da43d79efa846d73695b6052cbbdbf48a # v3.8.3
|
|
with:
|
|
token: ${{ secrets.HOMEBREW_TOKEN }}
|
|
formula: kubevela
|
|
tag: ${{ github.ref }}
|
|
revision: ${{ github.sha }}
|
|
force: false
|