Skip to content

Commit 9d68ad9

Browse files
ci: update the beta workflow and merge release&beta ci (#1280)
* ci: update the beta workflow and merge release&beta ci
1 parent 0b67eff commit 9d68ad9

File tree

2 files changed

+25
-178
lines changed

2 files changed

+25
-178
lines changed

.github/workflows/ci_beta.yml

Lines changed: 0 additions & 165 deletions
This file was deleted.

.github/workflows/ci_release.yml

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
tags:
66
- "v[0-9]+.[0-9]+.[0-9]+"
7+
- "v[0-9]+\\.[0-9]+\\.[0-9]+-beta"
78

89
env:
910
ARCHIVE_PREFIX: com.espressif.idf.update-
@@ -54,7 +55,7 @@ jobs:
5455
echo "codesigning espressif-ide-macosx.cocoa.x86_64"
5556
/usr/bin/codesign --entitlements $PWD/releng/com.espressif.idf.product/entitlements/espressif-ide.entitlement --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/x86_64/Espressif-IDE.app -v
5657
/usr/bin/codesign -v -vvv --deep $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/x86_64/Espressif-IDE.app
57-
58+
5859
echo "codesigning espressif-ide-macosx.cocoa.aarch64"
5960
/usr/bin/codesign --entitlements $PWD/releng/com.espressif.idf.product/entitlements/espressif-ide.entitlement --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/aarch64/Espressif-IDE.app -v
6061
/usr/bin/codesign -v -vvv --deep $PWD/releng/com.espressif.idf.product/target/products/com.espressif.idf.product/macosx/cocoa/aarch64/Espressif-IDE.app
@@ -256,14 +257,23 @@ jobs:
256257
- name: Extract version from tag and prepare folder
257258
id: get_version
258259
run: |
259-
if [[ "${GITHUB_REF}" == refs/tags/v* ]]; then
260-
TAG="${GITHUB_REF##*/}"
261-
VERSION="${TAG#v}"
260+
TAG="${GITHUB_REF##*/}"
261+
VERSION="${TAG#v}"
262+
if [[ "$TAG" == *"-beta"* ]]; then
263+
IS_BETA="true"
264+
UPLOAD_PATH="beta"
265+
REDIRECT_PATH="beta"
262266
else
263-
VERSION="testing"
267+
IS_BETA="false"
268+
UPLOAD_PATH="latest"
269+
REDIRECT_PATH="latest"
264270
fi
265271
echo "VERSION=$VERSION" >> $GITHUB_ENV
272+
echo "IS_BETA=$IS_BETA" >> $GITHUB_ENV
273+
echo "UPLOAD_PATH=$UPLOAD_PATH" >> $GITHUB_ENV
274+
echo "REDIRECT_PATH=$REDIRECT_PATH" >> $GITHUB_ENV
266275
echo "FOLDER=v$VERSION" >> $GITHUB_ENV
276+
echo "TAG=$TAG" >> $GITHUB_ENV
267277
268278
- name: Rename DMGs with version suffix
269279
run: |
@@ -289,31 +299,33 @@ jobs:
289299
- name: Upload build assets to dl.espressif.com
290300
run: |
291301
VERSION="${{ env.VERSION }}"
302+
UPLOAD_PATH="${{ env.UPLOAD_PATH }}"
303+
REDIRECT_PATH="${{ env.REDIRECT_PATH }}"
292304
293-
aws s3 rm "s3://${{ secrets.DL_BUCKET }}/dl/idf-eclipse-plugin/updates/latest" --recursive
305+
aws s3 rm "s3://${{ secrets.DL_BUCKET }}/dl/idf-eclipse-plugin/updates/$UPLOAD_PATH" --recursive
294306
295307
# Extract the update site from the versioned zip and upload its contents
296308
TMP_UPDATE_DIR="update_site_tmp"
297309
mkdir -p "$TMP_UPDATE_DIR"
298310
unzip -q "com.espressif.idf.update-v$VERSION.zip" -d "$TMP_UPDATE_DIR"
299311
echo "Contents of $TMP_UPDATE_DIR:"
300312
ls -l "$TMP_UPDATE_DIR"
301-
aws s3 cp --acl=public-read --recursive "$TMP_UPDATE_DIR/artifacts/update/" "s3://${{ secrets.DL_BUCKET }}/dl/idf-eclipse-plugin/updates/latest"
313+
aws s3 cp --acl=public-read --recursive "$TMP_UPDATE_DIR/artifacts/update/" "s3://${{ secrets.DL_BUCKET }}/dl/idf-eclipse-plugin/updates/$UPLOAD_PATH"
302314
aws s3 cp --acl=public-read --recursive "$TMP_UPDATE_DIR/artifacts/update/" "s3://${{ secrets.DL_BUCKET }}/dl/idf-eclipse-plugin/updates/v$VERSION"
303-
aws s3 cp --acl=public-read ./releng/index.html "s3://${{ secrets.DL_BUCKET }}/dl/idf-eclipse-plugin/updates/latest/"
315+
aws s3 cp --acl=public-read ./releng/index.html "s3://${{ secrets.DL_BUCKET }}/dl/idf-eclipse-plugin/updates/$UPLOAD_PATH/"
304316
305317
aws s3 cp --acl=public-read "com.espressif.idf.update-v$VERSION.zip" "s3://${{ secrets.DL_BUCKET }}/dl/idf-eclipse-plugin/updates/"
306318
aws s3 cp --acl=public-read --recursive artifacts/linux/ "s3://${{ secrets.DL_BUCKET }}/dl/idf-eclipse-plugin/ide/"
307319
aws s3 cp --acl=public-read "artifacts/macos_x86/Espressif-IDE-macosx-cocoa-x86_64-v$VERSION.dmg" "s3://${{ secrets.DL_BUCKET }}/dl/idf-eclipse-plugin/ide/"
308320
aws s3 cp --acl=public-read "artifacts/macos_arm/Espressif-IDE-macosx-cocoa-aarch64-v$VERSION.dmg" "s3://${{ secrets.DL_BUCKET }}/dl/idf-eclipse-plugin/ide/"
309321
aws s3 cp --acl=public-read "Espressif-IDE-$VERSION-win32.win32.x86_64.zip" "s3://${{ secrets.DL_BUCKET }}/dl/idf-eclipse-plugin/ide/"
310322
311-
aws cloudfront create-invalidation --distribution-id ${{ secrets.DL_DISTRIBUTION_ID }} --paths "/dl/idf-eclipse-plugin/updates/latest/*"
323+
aws cloudfront create-invalidation --distribution-id ${{ secrets.DL_DISTRIBUTION_ID }} --paths "/dl/idf-eclipse-plugin/updates/$UPLOAD_PATH/*"
312324
313-
aws s3api put-object --acl=public-read --bucket espdldata --key "dl/idf-eclipse-plugin/ide/Espressif-IDE-win32.win32.x86_64/latest" --website-redirect-location "/dl/idf-eclipse-plugin/ide/Espressif-IDE-$VERSION-win32.win32.x86_64.zip"
325+
aws s3api put-object --acl=public-read --bucket espdldata --key "dl/idf-eclipse-plugin/ide/Espressif-IDE-win32.win32.x86_64/$REDIRECT_PATH" --website-redirect-location "/dl/idf-eclipse-plugin/ide/Espressif-IDE-$VERSION-win32.win32.x86_64.zip"
314326
315-
aws s3api put-object --acl=public-read --bucket espdldata --key "dl/idf-eclipse-plugin/ide/Espressif-IDE-macosx-cocoa-x86_64/latest" --website-redirect-location "/dl/idf-eclipse-plugin/ide/Espressif-IDE-macosx-cocoa-x86_64-v$VERSION.dmg"
327+
aws s3api put-object --acl=public-read --bucket espdldata --key "dl/idf-eclipse-plugin/ide/Espressif-IDE-macosx-cocoa-x86_64/$REDIRECT_PATH" --website-redirect-location "/dl/idf-eclipse-plugin/ide/Espressif-IDE-macosx-cocoa-x86_64-v$VERSION.dmg"
316328
317-
aws s3api put-object --acl=public-read --bucket espdldata --key "dl/idf-eclipse-plugin/ide/Espressif-IDE-macosx-cocoa-aarch64/latest" --website-redirect-location "/dl/idf-eclipse-plugin/ide/Espressif-IDE-macosx-cocoa-aarch64-v$VERSION.dmg"
329+
aws s3api put-object --acl=public-read --bucket espdldata --key "dl/idf-eclipse-plugin/ide/Espressif-IDE-macosx-cocoa-aarch64/$REDIRECT_PATH" --website-redirect-location "/dl/idf-eclipse-plugin/ide/Espressif-IDE-macosx-cocoa-aarch64-v$VERSION.dmg"
318330
319-
aws s3api put-object --acl=public-read --bucket espdldata --key "dl/idf-eclipse-plugin/ide/Espressif-IDE-linux.gtk.x86_64/latest" --website-redirect-location "/dl/idf-eclipse-plugin/ide/Espressif-IDE-$VERSION-linux.gtk.x86_64.tar.gz"
331+
aws s3api put-object --acl=public-read --bucket espdldata --key "dl/idf-eclipse-plugin/ide/Espressif-IDE-linux.gtk.x86_64/$REDIRECT_PATH" --website-redirect-location "/dl/idf-eclipse-plugin/ide/Espressif-IDE-$VERSION-linux.gtk.x86_64.tar.gz"

0 commit comments

Comments
 (0)