mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-26 01:22:51 +00:00
Create release.yaml (#2812)
* Create release.yaml sync release workflow from 3.x * Update release.yaml * Update release.yaml * Update release.yaml
This commit is contained in:
parent
3990f14f3c
commit
a0c2bf5177
|
|
@ -0,0 +1,46 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: create draft release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set env
|
||||
run: echo "RELEASE_TAG=${GITHUB_REF:10}" >> $GITHUB_ENV
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '^1.23'
|
||||
- name: generate release artifacts
|
||||
run: |
|
||||
make release
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
draft: true
|
||||
files: out/*
|
||||
|
||||
- name: Get Version
|
||||
id: get_version
|
||||
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
||||
- name: Synchronize artifacts to OSS
|
||||
run: |
|
||||
rm -rf qsctl_v2.4.3_linux_amd64.tar.gz
|
||||
wget https://attack-on-titan.gd2.qingstor.com/qsctl/v2.4.3/qsctl_v2.4.3_linux_amd64.tar.gz
|
||||
tar -zxvf qsctl_v2.4.3_linux_amd64.tar.gz
|
||||
rm -rf qsctl_v2.4.3_linux_amd64.tar.gz
|
||||
mv qsctl_v2.4.3_linux_amd64 /usr/local/bin/qsctl
|
||||
echo "access_key_id: ${{secrets.KS_QSCTL_ACCESS_KEY_ID}}" > qsctl-config.yaml
|
||||
echo "secret_access_key: ${{ secrets.KS_QSCTL_SECRET_ACCESS_KEY }}" >> qsctl-config.yaml
|
||||
qsctl cp out/kubekey-${{ steps.get_version.outputs.VERSION }}-linux-amd64.tar.gz qs://kubernetes/kubekey/releases/download/${{ steps.get_version.outputs.VERSION }}/kubekey-${{ steps.get_version.outputs.VERSION }}-linux-amd64.tar.gz -c qsctl-config.yaml
|
||||
qsctl cp out/kubekey-${{ steps.get_version.outputs.VERSION }}-linux-arm64.tar.gz qs://kubernetes/kubekey/releases/download/${{ steps.get_version.outputs.VERSION }}/kubekey-${{ steps.get_version.outputs.VERSION }}-linux-arm64.tar.gz -c qsctl-config.yaml
|
||||
rm -rf qsctl-config.yaml
|
||||
Loading…
Reference in New Issue