From ebe5da711b04e4bf50186960467ae1feb5e3b151 Mon Sep 17 00:00:00 2001 From: cabbet Date: Wed, 9 Oct 2024 16:34:16 +0800 Subject: [PATCH] Add workflow config --- .github/workflows/main.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..430f4f9 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,36 @@ +name: CI Create Release + +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout Source + uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: '1.23.1' + - name: Get Version + id: branch-names + uses: tj-actions/branch-names@v8 + with: + strip_tag_prefix: v + - name: Build + run: | + chmod +x ./build.sh + ./build.sh ${{ steps.branch-names.outputs.tag }} X86 + ./build.sh ${{ steps.branch-names.outputs.tag }} ARM + - name: Create Release and Upload Release Asset + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + body: TODO New Release. + draft: true + files: | + eSDK_Huawei_Storage_Kubernetes_CSI_Plugin_V${{ steps.branch-names.outputs.tag }}_X86_64.zip + eSDK_Huawei_Storage_Kubernetes_CSI_Plugin_V${{ steps.branch-names.outputs.tag }}_ARM_64.zip \ No newline at end of file