Skip to content

Commit 2bc45df

Browse files
committed
ci: Change of not signing the Installer after build
1 parent 437b2c7 commit 2bc45df

File tree

4 files changed

+65
-8
lines changed

4 files changed

+65
-8
lines changed

.github/workflows/build-installer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
build-installer-offline:
4545
name: Build Offline Installer
4646
if: inputs.installer_type == 'offline'
47-
uses: espressif/idf-installer/.github/workflows/build-offline-installer.yml@main
47+
uses: espressif/idf-installer/.github/workflows/build-offline-installer.yml@change/not_signing_releases
4848
with:
4949
esp_idf_version: ${{ inputs.esp_idf_version }}
5050
secrets: inherit

.github/workflows/build-offline-installer.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
CERTIFICATE: ${{ secrets.CERTIFICATE }}
4545
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
4646
shell: pwsh
47-
run: .\Build-Installer.ps1 -InstallerType offline -OfflineBranch v${{ env.IDF_BRANCH }}
47+
run: .\Build-Installer.ps1 -InstallerType offline -SignInstaller $false -OfflineBranch v${{ env.IDF_BRANCH }}
4848

4949
- name: Create Release
5050
id: create_release
@@ -54,12 +54,12 @@ jobs:
5454
with:
5555
tag_name: ${{ env.VERSION }}
5656
release_name: Release ${{ env.VERSION }}
57-
draft: false
58-
prerelease: false
57+
draft: true
58+
prerelease: true
5959

6060
- name: Get installer size and store it to file
6161
run: |
62-
echo $(Get-ItemProperty -Path .\build\esp-idf-tools-setup-offline-signed.exe | Select-Object -ExpandProperty Length) > variables.txt
62+
echo $(Get-ItemProperty -Path .\build\esp-idf-tools-setup-offline-unsigned.exe | Select-Object -ExpandProperty Length) > variables.txt
6363
echo "Instaler size from variable is $(Get-Content variables.txt)"
6464
- name: Upload artifacts of installer size
6565
uses: actions/upload-artifact@v4
@@ -74,7 +74,7 @@ jobs:
7474
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7575
with:
7676
upload_url: ${{ steps.create_release.outputs.upload_url }}
77-
asset_path: ./build/esp-idf-tools-setup-offline-signed.exe
77+
asset_path: ./build/esp-idf-tools-setup-offline-unsigned.exe
7878
asset_name: esp-idf-tools-setup-${{ env.VERSION }}.exe
7979
asset_content_type: application/octet-stream
8080

@@ -85,4 +85,4 @@ jobs:
8585
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
8686
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
8787
shell: pwsh
88-
run: aws s3 cp --acl=public-read --no-progress ./build/esp-idf-tools-setup-offline-signed.exe s3://${{ secrets.DL_BUCKET }}/dl/idf-installer/esp-idf-tools-setup-${{ env.VERSION }}.exe
88+
run: aws s3 cp --acl=public-read --no-progress ./build/esp-idf-tools-setup-offline-unsigned.exe s3://${{ secrets.DL_BUCKET }}/dl/idf-installer/esp-idf-tools-setup-${{ env.VERSION }}.exe
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: re-upload_release_to_dl_esp
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release_tag:
7+
type: string
8+
description: 'Release Tag'
9+
required: true
10+
11+
jobs:
12+
re-upload:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Download Release Asset
19+
id: download-asset
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
RELEASE_NAME: ${{ github.event.inputs.release_tag }}
23+
run: |
24+
# Get the release by name/tag
25+
echo "Fetching release: $RELEASE_TAG"
26+
gh release download "$RELEASE_TAG" \
27+
--pattern "esp-idf-tools-setup-*.exe" \
28+
--dir ./build/ \
29+
--repo ${{ github.repository }}
30+
31+
# Find the downloaded file and set as output
32+
ASSET_FILE=$(find ./build/ -name "esp-idf-tools-setup-*.exe" -type f | head -n1)
33+
echo "Downloaded asset: $ASSET_FILE"
34+
echo "asset_path=$ASSET_FILE" >> $GITHUB_OUTPUT
35+
36+
# Extract version from filename for later use
37+
FILENAME=$(basename "$ASSET_FILE")
38+
VERSION=$(echo "$FILENAME" | sed -n 's/esp-idf-tools-setup-\(.*\)\.exe/\1/p')
39+
echo "version=$VERSION" >> $GITHUB_OUTPUT
40+
echo "Extracted version: $VERSION"
41+
42+
- name: Upload Release Asset To dl.espressif.com
43+
id: upload-release-asset-espressif
44+
env:
45+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
46+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
47+
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
48+
run: |
49+
ASSET_PATH="${{ steps.download-asset.outputs.asset_path }}"
50+
VERSION="${{ steps.download-asset.outputs.version }}"
51+
52+
echo "Uploading $ASSET_PATH to S3..."
53+
aws s3 cp --acl=public-read --no-progress "$ASSET_PATH" \
54+
s3://${{ secrets.DL_BUCKET }}/dl/idf-installer/esp-idf-tools-setup-$VERSION.exe
55+
56+
echo "Upload completed successfully!"

Build-Installer.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,8 @@ if (0 -eq $LASTEXITCODE) {
635635
}
636636

637637
if ($true -eq $SignInstaller) {
638-
SignInstaller
638+
# SignInstaller
639+
"Leaving installer unsigned."
639640
} else {
640641
"Signing installer disabled by command line option. Leaving installer unsigned."
641642
}

0 commit comments

Comments
 (0)