Skip to content

Commit e1f7cdf

Browse files
authored
Merge pull request #28 from IPdotSetAF/27-platformio-publish-ci
Create platformio-publish-release.yml
2 parents 38b3340 + 42a0a2b commit e1f7cdf

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Publish PlatformIO - Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
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: Login to PlatformIO
30+
run: pio account login -u ${{ secrets.PLATFORMIO_USERNAME }} -p ${{ secrets.PLATFORMIO_PASSWORD }}
31+
32+
- name: Publish Package
33+
run: pio pkg publish
34+
35+
- name: Create Package
36+
run: pio pkg pack -o ${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz
37+
38+
- name: Release
39+
uses: softprops/action-gh-release@v2
40+
with:
41+
prerelease: true
42+
generate_release_notes: true
43+
files: |
44+
${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz
45+

0 commit comments

Comments
 (0)