Skip to content

Commit

Permalink
Merge pull request #177 from snyk/chore/IDE-356_update-release-process
Browse files Browse the repository at this point in the history
fix: s3 publishing
  • Loading branch information
ShawkyZ committed May 28, 2024
2 parents 3470750 + 6a3aba7 commit 24a0295
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/upload-to-s3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.
#

set -euo pipefail
set -exo pipefail

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
# shellcheck disable=SC2002
Expand Down Expand Up @@ -49,7 +49,7 @@ function uploadFile() {
[ ! -d "$FILENAME_SRC" ] && echo "Directory $FILENAME_SRC does not exist." && exit 1

# shellcheck disable=SC2086
aws s3 cp --recursive $DRY_RUN "$FILENAME_SRC" "s3://$AWS_S3_BUCKET_NAME/$BASE/$FILENAME_DST"
aws s3 cp $DEBUG --recursive $DRY_RUN "$FILENAME_SRC" "s3://$AWS_S3_BUCKET_NAME/$BASE/$FILENAME_DST"
}

# publish repo
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,6 @@ jobs:
AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_REGION: us-east-1
run: |
.github/upload-to-s3.sh preview
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ jobs:
- name: Create release
if: ${{ !env.ACT }}
id: create_release
env:
GH_TOKEN: ${{ github.token }}
run: gh release create ${{ steps.createTag.outputs.tagName }} --generate-notes $(find . -name 'update-site-*.zip')

- name: Upload binaries to static.snyk.io
Expand All @@ -60,5 +62,6 @@ jobs:
AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_REGION: us-east-1
run: |
.github/upload-to-s3.sh stable

0 comments on commit 24a0295

Please sign in to comment.