-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: push only latest version to krew
Signed-off-by: Tiago Castro <[email protected]>
- Loading branch information
1 parent
ec7ae05
commit a2109d2
Showing
1 changed file
with
29 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 |
---|---|---|
@@ -1,24 +1,39 @@ | ||
name: Publish Release Artifacts | ||
on: | ||
release: | ||
types: [published] | ||
types: [ published ] | ||
push: | ||
branches: | ||
- krew-fix | ||
jobs: | ||
publish-artifacts: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Download Artifacts | ||
run: | | ||
echo "Release Tag: ${{ github.event.release.tag_name }}" | ||
./scripts/github/release-artifacts.sh --tag "${{ github.event.release.tag_name }}" --workflow "Release Artifacts" --repo-org "${{ github.repository_owner }}" download | ||
- name: get latest tag | ||
id: get-latest-tag | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.ORG_CI_GITHUB }} | ||
- name: Upload Artifacts | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
repos="mayastor-extensions mayastor-control-plane mayastor" | ||
./scripts/github/release-artifacts.sh --tag "${{ github.event.release.tag_name }}" --repo-org "${{ github.repository_owner }}" --upload "$repos" upload | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.ORG_CI_GITHUB }} | ||
export LATEST_TAG=`gh api repos/${{ github.repository_owner }}/mayastor-extensions/releases/latest | jq -r '.tag_name'` | ||
echo "Got the latest tag:$LATEST_TAG" | ||
#echo "event.tag:"${{ github.event.release.tag_name }} | ||
echo ${{ github.event_name }} | ||
echo "latestTag=$LATEST_TAG" >> "$GITHUB_OUTPUT" | ||
# - uses: actions/checkout@v4 | ||
# - name: Download Artifacts | ||
# run: | | ||
# echo "Release Tag: ${{ github.event.release.tag_name }}" | ||
# ./scripts/github/release-artifacts.sh --tag "${{ github.event.release.tag_name }}" --workflow "Release Artifacts" --repo-org "${{ github.repository_owner }}" download | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.ORG_CI_GITHUB }} | ||
# - name: Upload Artifacts | ||
# run: | | ||
# repos="mayastor-extensions mayastor-control-plane mayastor" | ||
# ./scripts/github/release-artifacts.sh --tag "${{ github.event.release.tag_name }}" --repo-org "${{ github.repository_owner }}" --upload "$repos" upload | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.ORG_CI_GITHUB }} | ||
- name: Update krew index | ||
if: "!github.event.release.prerelease" | ||
uses: rajatjindal/[email protected] | ||
#if: ${{ !github.event.release.prerelease && (steps.get-latest-tag.outputs.latestTag == github.event.release.tag_name) }} | ||
if: ${{ !(github.event_name == 'push') && (steps.get-latest-tag.outputs.latestTag == 'v2.8.0') }} | ||
run: echo "UPDATE" | ||
#uses: rajatjindal/[email protected] |