Skip to content

Commit

Permalink
Update Github Action to v4 (Node.js 20) (#63)
Browse files Browse the repository at this point in the history
* Update Github Action to Node.js 20

* Code clean-up
  • Loading branch information
awawa-dev authored Oct 23, 2024
1 parent 8041360 commit e662330
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every month
interval: "monthly"
24 changes: 15 additions & 9 deletions .github/workflows/push-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,27 @@ jobs:
PlatformIO:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]

- name: Cache pip
uses: actions/cache@v3
uses: actions/cache@v4.1.2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v3
uses: actions/cache@v4.1.2
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5.2.0
with:
python-version: 3.x

- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
Expand All @@ -39,19 +43,19 @@ jobs:
zip -j .pio/build/recovery_firmware.zip .pio/build/*.factory.bin
rm -f .pio/build/*.factory.bin
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4.4.3
name: Upload artifacts (commit)
if: (startsWith(github.event.ref, 'refs/tags') != true)
with:
path: |
.pio/build/*.bin
.pio/build/recovery_firmware.zip
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4.4.3
name: Upload artifacts (release)
if: startsWith(github.ref, 'refs/tags/')
with:
name: firmware-release
name: firmware-release-generic
path: |
.pio/build/*.bin
.pio/build/recovery_firmware.zip
Expand All @@ -77,13 +81,15 @@ jobs:
if: contains(env.VERSION, 'alpha') || contains(env.VERSION, 'beta')
run: echo "preRelease=true" >> $GITHUB_ENV

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4.1.8
with:
name: firmware-release
pattern: firmware-release-*
merge-multiple: true

# create draft release and upload artifacts
- name: Create draft release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2.0.8
with:
name: HyperSerialESP32 ${{ env.VERSION }}
tag_name: ${{ env.TAG }}
Expand Down

0 comments on commit e662330

Please sign in to comment.