mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-26 01:22:51 +00:00
46 lines
1.8 KiB
YAML
46 lines
1.8 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
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@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Install go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: '^1.19'
|
|
- name: generate release artifacts
|
|
run: |
|
|
make release
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
draft: true
|
|
files: out/*
|
|
|
|
- name: Get Version
|
|
id: get_version
|
|
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
|
|
- 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
|
|
mv qsctl_v2.4.3_linux_amd64 /usr/local/bin/qsctl
|
|
echo "access_key_id: ${{secrets.QSCTL_SECRET_ACCESS_KEY}}" > qsctl-config.yaml
|
|
echo "secret_access_key: ${{ secrets.QSCTL_ACCESS_KEY_ID }}" >> 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
|