Skip to content

Commit 99870e3

Browse files
authored
Merge c9b8915 into 28a4148
2 parents 28a4148 + c9b8915 commit 99870e3

File tree

6 files changed

+378
-146
lines changed

6 files changed

+378
-146
lines changed
Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,26 @@
11
name: build-espressif-ide-installer
22

33
on:
4-
workflow_dispatch:
4+
workflow_call:
55
inputs:
6-
espressif_ide_version:
7-
description: 'Espressif IDE version'
8-
required: true
9-
default: '2.9.1'
106
esp_idf_version:
11-
description: 'ESP-IDF version'
127
required: true
13-
default: '5.0.1'
14-
python_version:
15-
description: 'Python version'
8+
type: string
9+
espressif_ide_version:
1610
required: true
17-
default: '3.11'
11+
type: string
1812

1913
jobs:
2014
build-espressif-ide-installer:
2115
name: Build Installer
2216
runs-on: windows-latest
2317
steps:
2418
- name: Checkout repository
25-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2620
- name: Inputs Logged
2721
run: |
2822
echo "Received Espressif IDE Version: ${{ github.event.inputs.espressif_ide_version }}"
2923
echo "Received ESP-IDF Version: ${{ github.event.inputs.esp_idf_version }}"
30-
echo "Received Python Version: ${{ github.event.inputs.python_version }}"
3124
- name: Map local long path to new drive
3225
id: map_path
3326
shell: pwsh
@@ -36,9 +29,9 @@ jobs:
3629
shell: pwsh
3730
run: choco install innosetup
3831
- name: Set up Python
39-
uses: actions/setup-python@v4
32+
uses: actions/setup-python@v5
4033
with:
41-
python-version: '${{ github.event.inputs.python_version }}'
34+
python-version: '3.11'
4235
- name: Install Inno Setup Download plugin
4336
shell: pwsh
4437
run: Invoke-WebRequest -Uri https://github.com/espressif/inno-download-plugin/releases/download/v1.5.1/idpsetup-1.5.1.exe -OutFile idpsetup.exe; .\idpsetup.exe /SILENT; Sleep 5
@@ -48,15 +41,15 @@ jobs:
4841
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
4942
shell: pwsh
5043
working-directory: "P:"
51-
run: .\Build-Installer.ps1 -InstallerType espressif-ide -OfflineBranch "v${{ github.event.inputs.esp_idf_version }}" -EspressifIdeVersion "${{ github.event.inputs.espressif_ide_version }}"
44+
run: .\Build-Installer.ps1 -InstallerType espressif-ide -OfflineBranch "v${{ inputs.esp_idf_version }}" -EspressifIdeVersion "${{ inputs.espressif_ide_version }}"
5245
- name: Create Release
5346
id: create_release
5447
uses: actions/create-release@v1
5548
env:
5649
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5750
with:
58-
tag_name: espressif-ide-${{ github.event.inputs.espressif_ide_version }}-esp-idf-${{ github.event.inputs.esp_idf_version }}
59-
release_name: Release of Espressif IDE ${{ github.event.inputs.espressif_ide_version }} with ESP-IDF ${{ github.event.inputs.esp_idf_version }}
51+
tag_name: espressif-ide-${{ inputs.espressif_ide_version }}-esp-idf-${{ inputs.esp_idf_version }}
52+
release_name: Release of Espressif IDE ${{ inputs.espressif_ide_version }} with ESP-IDF ${{ inputs.esp_idf_version }}
6053
draft: true
6154
prerelease: true
6255
- name: Upload Release Asset To Github
@@ -66,8 +59,8 @@ jobs:
6659
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6760
with:
6861
upload_url: ${{ steps.create_release.outputs.upload_url }}
69-
asset_path: ./build/espressif-ide-setup-espressif-ide-with-esp-idf-${{ github.event.inputs.esp_idf_version }}-signed.exe
70-
asset_name: espressif-ide-setup-${{ github.event.inputs.espressif_ide_version }}-with-esp-idf-${{ github.event.inputs.esp_idf_version }}.exe
62+
asset_path: ./build/espressif-ide-setup-espressif-ide-with-esp-idf-${{ inputs.esp_idf_version }}-signed.exe
63+
asset_name: espressif-ide-setup-${{ inputs.espressif_ide_version }}-with-esp-idf-${{ inputs.esp_idf_version }}.exe
7164
asset_content_type: application/octet-stream
7265
- name: Upload Release Asset To dl.espressif.com
7366
id: upload-release-asset-espressif
@@ -76,4 +69,4 @@ jobs:
7669
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
7770
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
7871
shell: pwsh
79-
run: aws s3 cp --acl=public-read --no-progress ./build/espressif-ide-setup-espressif-ide-with-esp-idf-${{ github.event.inputs.esp_idf_version }}-signed.exe s3://${{ secrets.DL_BUCKET }}/dl/idf-installer/espressif-ide-setup-${{ github.event.inputs.espressif_ide_version }}-with-esp-idf-${{ github.event.inputs.esp_idf_version }}.exe
72+
run: aws s3 cp --acl=public-read --no-progress ./build/espressif-ide-setup-espressif-ide-with-esp-idf-${{ inputs.esp_idf_version }}-signed.exe s3://${{ secrets.DL_BUCKET }}/dl/idf-installer/espressif-ide-setup-${{ inputs.espressif_ide_version }}-with-esp-idf-${{ inputs.esp_idf_version }}.exe
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: build-installer-any
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
installer_type:
7+
type: choice
8+
description: 'Installer Type'
9+
required: true
10+
options:
11+
- offline
12+
- espressif-ide
13+
- online
14+
installer_size:
15+
description: 'Installer Size (e.g 1.69 GB)'
16+
required: true
17+
default: '1.5 GB'
18+
esp_idf_version:
19+
description: 'ESP-IDF version (e.g. 5.2 or 5.2.1)'
20+
required: false
21+
default: '5.2.1'
22+
espressif_ide_version:
23+
description: 'Espressif IDE version (e.g. 2.0.0)'
24+
required: false
25+
default: ''
26+
online_installer_version:
27+
description: 'Online Installer version (e.g. 2.0)'
28+
required: false
29+
default: ''
30+
pull_request: # TODO Remove this once the workflow is tested
31+
32+
env:
33+
INSTALLER_TYPE: "offline" #${{ inputs.installer_type }}
34+
#INSTALLER_SIZE: "1.5 GB" #${{ inputs.installer_size }}
35+
ESP_IDF_VERSION: "5.2.1" #${{ inputs.esp_idf_version }}
36+
ESPRESSIF_IDE_VERSION: #${{ inputs.espressif_ide_version }}
37+
ONLINE_INSTALLER_VERSION: #${{ inputs.online_installer_version }}
38+
39+
jobs:
40+
# build-installer-online:
41+
# needs: update-docs-files
42+
# name: Build Online Installer
43+
# if: ${{ env.INSTALLER_TYPE }} == 'online'
44+
# uses: espressif/idf-installer/.github/workflows/build-online-installer.yml@feat/automatic_installer_release # TODO
45+
# with:
46+
# online_installer_version: ${{ inputs.online_installer_version }}
47+
# secrets: inherit
48+
49+
build-installer-offline:
50+
#needs: update-docs-files
51+
name: Build Offline Installer
52+
# if: ${{ env.INSTALLER_TYPE }} == 'offline'
53+
uses: espressif/idf-installer/.github/workflows/build-offline-installer.yml@feat/automatic_installer_release # TODO
54+
with:
55+
esp_idf_version: "5.2.1"
56+
secrets: inherit
57+
58+
# build-installer-ide:
59+
# needs: update-docs-files
60+
# name: Build IDE Installer
61+
# if: ${{ env.INSTALLER_TYPE }} == 'espressif-ide'
62+
# uses: espressif/idf-installer/.github/workflows/build-espressif-ide-installer.yml@feat/automatic_installer_release # TODO
63+
# with:
64+
# esp_idf_version: ${{ env.ESP_IDF_VERSION }}
65+
# espressif_ide_version: ${{ env.ESPRESSIF_IDE_VERSION }}
66+
# secrets: inherit
67+
68+
update-docs-files:
69+
needs: build-installer-offline
70+
name: Build ${{ inputs.installer_type}} Installer
71+
runs-on: windows-latest
72+
strategy:
73+
fail-fast: false
74+
steps:
75+
- name: Checkout repository
76+
uses: actions/checkout@v4
77+
78+
- name: Set up Python
79+
uses: actions/setup-python@v5
80+
with:
81+
python-version: '3.11'
82+
83+
- name: Get size of offline installer
84+
run: echo "installer size is $INSTALLER_SIZE Bytes"
85+
env:
86+
INSTALLER_SIZE: ${{ needs.build-installer-offline.outputs.installer_size }}
87+
88+
- name: Update docs files
89+
run: |
90+
python scripts/docs_update_release.py
91+
92+
- name: Create Pull Request
93+
uses: peter-evans/create-pull-request@v6
94+
with:
95+
token: ${{ secrets.GITHUB_TOKEN }}
96+
commit-message: 'Release ${{ env.INSTALLER_TYPE }} installer ${{env.ESPRESSIF_IDE_VERSION}}${{env.ONLINE_INSTALLER_VERSION}} with ESP-IDF v${{ env.ESP_IDF_VERSION }}'
97+
title: 'Release ${{ env.INSTALLER_TYPE }} installer ${{env.ESPRESSIF_IDE_VERSION}}${{env.ONLINE_INSTALLER_VERSION}} with ESP-IDF v${{ env.ESP_IDF_VERSION }}'
98+
body: '- Updated docs files'
99+
branch: 'release-${{ env.INSTALLER_TYPE }}-installer'
100+
delete-branch: true
101+
base: 'main'
Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,31 @@
11
name: build-offline-installer
22

33
on:
4-
workflow_dispatch:
5-
6-
push:
7-
tags:
8-
- offline-*
4+
workflow_call:
5+
inputs:
6+
esp_idf_version:
7+
required: true
8+
type: string
9+
outputs:
10+
installer_size:
11+
description: 'The size of the installer'
12+
value: ${{ jobs.build-offline-installer.outputs.size }}
13+
14+
env:
15+
IDF_BRANCH: ${{ inputs.esp_idf_version }}
16+
VERSION: 'offline-${{ inputs.esp_idf_version }}'
917

1018
jobs:
1119
build-offline-installer:
1220
name: Build Installer
1321
runs-on: windows-latest
22+
outputs:
23+
size: ${{ steps.get_installer_size.outputs.INSTALLER_SIZE }}
1424
steps:
1525
- name: Checkout repository
16-
uses: actions/checkout@v3
17-
- name: Get the version
18-
id: get_version
19-
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
20-
shell: bash
21-
- name: Get the installer type
22-
id: get_installer_type
23-
run: echo ::set-output name=INSTALLER_TYPE::${${{ steps.get_version.outputs.VERSION }}//-*}
24-
shell: bash
25-
- name: Get version for branch
26-
id: get_branch_version
27-
run: echo ::set-output name=BRANCH_VERSION::${GITHUB_REF/refs\/tags\/offline-/}
28-
shell: bash
26+
uses: actions/checkout@v4
2927
- name: Set up Python 3.11
30-
uses: actions/setup-python@v4
28+
uses: actions/setup-python@v5
3129
with:
3230
python-version: '3.11'
3331
- name: Install Inno Setup Download plugin
@@ -38,17 +36,21 @@ jobs:
3836
CERTIFICATE: ${{ secrets.CERTIFICATE }}
3937
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
4038
shell: pwsh
41-
run: .\Build-Installer.ps1 -InstallerType offline -OfflineBranch v${{ steps.get_branch_version.outputs.BRANCH_VERSION }}
39+
run: .\Build-Installer.ps1 -InstallerType offline -OfflineBranch v${{ env.IDF_BRANCH }}
4240
- name: Create Release
4341
id: create_release
4442
uses: actions/create-release@v1
4543
env:
4644
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4745
with:
48-
tag_name: ${{ github.ref }}
46+
tag_name: ${{ env.VERSION }}-esp-idf-v${{ env.IDF_BRANCH }}
4947
release_name: Release ${{ github.ref }}
5048
draft: false
5149
prerelease: false
50+
- name: Get installer size
51+
id: get_installer_size
52+
run: echo "INSTALLER_SIZE=$(Get-ItemProperty -Path .\build\esp-idf-tools-setup-offline-signed.exe | Select-Object -ExpandProperty Length)" >> $GITHUB_OUTPUT
53+
shell: pwsh
5254
- name: Upload Release Asset To Github
5355
id: upload-release-asset
5456
uses: actions/upload-release-asset@v1
@@ -57,7 +59,7 @@ jobs:
5759
with:
5860
upload_url: ${{ steps.create_release.outputs.upload_url }}
5961
asset_path: ./build/esp-idf-tools-setup-offline-signed.exe
60-
asset_name: esp-idf-tools-setup-${{ steps.get_version.outputs.VERSION }}.exe
62+
asset_name: esp-idf-tools-setup-${{ env.VERSION }}.exe
6163
asset_content_type: application/octet-stream
6264
- name: Upload Release Asset To dl.espressif.com
6365
id: upload-release-asset-espressif
@@ -66,4 +68,4 @@ jobs:
6668
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
6769
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
6870
shell: pwsh
69-
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-${{ steps.get_version.outputs.VERSION }}.exe
71+
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

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
11
name: build-online-installer
22

33
on:
4-
push:
5-
tags:
6-
- online-*
4+
workflow_call:
5+
inputs:
6+
online_installer_version:
7+
required: true
8+
type: string
9+
710

811
jobs:
912
build-online-installer:
1013
name: Build Installer
1114
runs-on: windows-latest
1215
steps:
1316
- name: Checkout repository
14-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1518
- name: Get the version
1619
id: get_version
17-
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
20+
run: echo "VERSION=online-${{ inputs.online_installer_version }}" >> $GITHUB_OUTPUT
1821
shell: bash
1922
- name: Get the installer type
2023
id: get_installer_type
21-
run: echo ::set-output name=INSTALLER_TYPE::${${{ steps.get_version.outputs.VERSION }}//-*}
24+
run: echo "INSTALLER_TYPE=${${{ steps.get_version.outputs.VERSION }}//-*}" >> $GITHUB_OUTPUT
2225
shell: bash
2326
- name: Install Inno Setup Download plugin
2427
shell: pwsh

0 commit comments

Comments
 (0)