Skip to content

Commit

Permalink
Publishing packages on GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
jacekwegr committed Dec 27, 2024
1 parent bf50db9 commit bbcfaf0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .circleci/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,7 @@ jobs:
- run:
name: Publish package
command: |
if [ -n "${CIRCLE_TAG}" ]; then tools/circle-install-packages.sh gh; fi
./tools/pkg/publish.sh
filters:
Expand All @@ -724,7 +725,7 @@ filters:
- &all_tags_and_master
<<: *all_tags
branches:
only: master
only: publish-packages-gh

workflows:
version: 2
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.3.0
1.2.3-test
3 changes: 3 additions & 0 deletions tools/pkg/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ aws configure set default.region $AWS_DEFAULT_REGION

if [ -n "$CIRCLE_TAG" ]; then
aws s3 cp "${PACKAGE_NAME}" "s3://mim-packages/tags/${CIRCLE_TAG}/${PACKAGE_NAME}" --acl public-read --quiet

echo "$GH_RELEASE_TOKEN" | gh auth login --with-token
gh release upload "${CIRCLE_TAG}" "${PACKAGE_NAME}" --repo "${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}"
else
aws s3 cp "${PACKAGE_NAME}" "s3://mim-packages/branches/${CIRCLE_BRANCH}/${prefix}/${PACKAGE_NAME}" --acl public-read --quiet
fi

0 comments on commit bbcfaf0

Please sign in to comment.