-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: fix release kbcli tag name (#153)
- Loading branch information
Showing
2 changed files
with
16 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,8 @@ name: Release Create | |
on: | ||
push: | ||
tags: | ||
- v* | ||
- '!*cloud*' | ||
|
||
- 'v*' | ||
- '!*cloud' | ||
|
||
jobs: | ||
release-create: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 }} | ||
|
@@ -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: | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 }} | ||
|
@@ -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 |