Skip to content

Commit 78e1118

Browse files
authored
Create platformio-publish-release.yml
1 parent 38b3340 commit 78e1118

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Publish PlatformIO - Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
publish-platformio-release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: actions/cache@v4
18+
with:
19+
path: |
20+
~/.cache/pip
21+
~/.platformio/.cache
22+
key: ${{ runner.os }}-pio
23+
- uses: actions/setup-python@v5
24+
with:
25+
python-version: '3.11'
26+
- name: Install PlatformIO Core
27+
run: pip install --upgrade platformio
28+
29+
- name: Build PlatformIO Project
30+
run: pio run
31+
32+
- name: Login to PlatformIO
33+
run: pio account login -u ${{ secrets.PLATFORMIO_USERNAME }} -p ${{ secrets.PLATFORMIO_PASSWORD }}
34+
35+
# - name: Publish Package
36+
# run: pio pkg publish
37+
38+
- name: Create Package
39+
run: pio pkg pack -o ${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz
40+
41+
- name: Release
42+
uses: softprops/action-gh-release@v2
43+
with:
44+
prerelease: true
45+
generate_release_notes: true
46+
files: |
47+
${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz
48+

0 commit comments

Comments
 (0)