Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Upload build artifacts for release #69

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions .github/scripts/upload_artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,9 @@ then
exit 1
fi

echo "Adding assets to Github release"
echo "Adding artifacts to Github release"
UPLOAD_URL="https://uploads.github.com/repos/kyma-project/modulectl/releases/${RELEASE_ID}/assets"

echo "$UPLOAD_URL"
pwd
ls -la
echo "modulectl-linux" "${UPLOAD_URL}?name=modulectl-linux"
#uploadFile "modulectl-linux" "${UPLOAD_URL}?name=modulectl-linux"
uploadFile "bin/modulectl-linux" "${UPLOAD_URL}?name=modulectl-linux"
uploadFile "bin/modulectl-linux-arm" "${UPLOAD_URL}?name=modulectl-linux-arm"
uploadFile "bin/modulectl-darwin" "${UPLOAD_URL}?name=modulectl-darwin"
uploadFile "bin/modulectl-darwin-arm" "${UPLOAD_URL}?name=modulectl-darwin-arm"
6 changes: 3 additions & 3 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
git push origin ${{ github.event.inputs.tag }} --tags
outputs:
release_id: ${{ steps.draft-release.outputs.release_id }}
artifacts:
create-artifacts:
runs-on: ubuntu-latest
needs: draft-release
steps:
Expand All @@ -65,13 +65,13 @@ jobs:
cache-dependency-path: 'go.sum'
- name: "Run 'make build' with version"
run: make build VERSION=${{ github.event.inputs.tag }}
- name: Add binaries to draft
- name: Add binaries to draft release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./.github/scripts/upload_artifacts.sh ${{ github.event.inputs.tag }}
publish-release:
runs-on: ubuntu-latest
needs: [ validate-release, draft-release, artifacts ]
needs: [ validate-release, draft-release, create-artifacts ]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
Loading