Skip to content

Commit

Permalink
chore: fix release kbcli tag name (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
JashBook authored Dec 27, 2023
1 parent 5695dc1 commit f1704c0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/release-create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ name: Release Create
on:
push:
tags:
- v*
- '!*cloud*'

- 'v*'
- '!*cloud'

jobs:
release-create:
Expand Down
25 changes: 14 additions & 11 deletions .github/workflows/release-kbcli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ on:
env:
GH_TOKEN: ${{ github.token }}
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
RELEASE_VERSION: ${{ github.ref_name }}
TAG_NAME: ${{ github.ref_name }}
GO_VERSION: "1.21"
CLI_NAME: 'kbcli'
CLI_REPO: 'apecloud/kbcli'
JIHULAB_KBCLI_PROJECT_ID: 85948
JIHULAB_ACCESS_TOKEN: ${{ secrets.GITLAB_ACCESS_TOKEN }}
FURY_TOKEN: ${{ secrets.FURY_UPLOAD_TOKEN }}
Expand All @@ -30,7 +29,7 @@ jobs:
bash ${{ github.workspace }}/.github/utils/release_gitlab.sh \
--type 1 \
--project-id ${{ env.JIHULAB_KBCLI_PROJECT_ID }} \
--tag-name ${{ env.RELEASE_VERSION }} \
--tag-name ${{ env.TAG_NAME }} \
--access-token ${{ env.JIHULAB_ACCESS_TOKEN }}
gorelease-assert:
Expand Down Expand Up @@ -75,22 +74,26 @@ jobs:
curl -F package=@$file https://${{ env.FURY_TOKEN }}@push.fury.io/${{ env.FURY_ACCOUNT }}/
done
- name: Get release
id: get_release
uses: bruceadams/[email protected]
- name: get kbcli's release upload url
run: |
echo 'UPLOAD_URL='`bash ${{ github.workspace }}/.github/utils/utils.sh \
--tag-name ${{ env.TAG_NAME }} \
--type 3 \
--github-repo "${{ github.repository }}" \
--github-token ${{ env.GITHUB_TOKEN }}` >> $GITHUB_ENV
- name: upload kbcli.exe to kbcli's release page for winget
uses: actions/upload-release-asset@main
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
upload_url: ${{ env.UPLOAD_URL }}
asset_path: ${{ github.workspace }}/dist/kbcli_windows_amd64_v1/${{ env.CLI_NAME }}.exe
asset_name: ${{ env.CLI_NAME }}.exe
asset_content_type: application/octet-stream

- name: Upload kbcli Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.RELEASE_VERSION }}-kbcli
name: ${{ env.TAG_NAME }}-kbcli
path: |
./dist/*.tar.gz
./dist/*.zip
Expand All @@ -109,7 +112,7 @@ jobs:
- name: Download Kbcli Artifact
uses: actions/[email protected]
with:
name: ${{ env.RELEASE_VERSION }}-kbcli
name: ${{ env.TAG_NAME }}-kbcli
path: ${{ github.workspace }}/dist

- name: upload assets to gitlab
Expand All @@ -121,7 +124,7 @@ jobs:
bash ${{ github.workspace }}/.github/utils/release_gitlab.sh \
--type 2 \
--project-id ${{ env.JIHULAB_KBCLI_PROJECT_ID }} \
--tag-name ${{ env.RELEASE_VERSION }} \
--tag-name ${{ env.TAG_NAME }} \
--asset-path $file \
--asset-name $filename \
--access-token ${{ env.JIHULAB_ACCESS_TOKEN }}
Expand All @@ -135,4 +138,4 @@ jobs:
- name: Remove kbcli Artifact
uses: geekyeggo/delete-artifact@v2
with:
name: ${{ env.RELEASE_VERSION }}-kbcli
name: ${{ env.TAG_NAME }}-kbcli

0 comments on commit f1704c0

Please sign in to comment.