Skip to content

Commit f4701ec

Browse files
committed
Update release worfklow to publish platformIO
1 parent 3a50c71 commit f4701ec

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

.github/workflows/release.yml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1+
name: Release workflow
2+
13
on:
24
push:
35
# Sequence of patterns matched against refs/tags
46
tags:
57
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
68

7-
name: Create Release
8-
99
jobs:
10-
build:
10+
# Create the release from the tag
11+
create-release:
1112
name: Create Release
1213
runs-on: ubuntu-latest
1314
steps:
@@ -17,11 +18,31 @@ jobs:
1718
id: create_release
1819
uses: actions/create-release@v1
1920
env:
20-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2122
with:
2223
tag_name: ${{ github.ref }}
2324
release_name: Release ${{ github.ref }}
2425
body: |
2526
See the [CHANGELOG](CHANGELOG.md)
2627
draft: false
27-
prerelease: false
28+
prerelease: false
29+
30+
# Publish package to PlatformIO
31+
publish-platformio:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Checkout code
35+
uses: actions/checkout@v4
36+
37+
- name: Set up Python
38+
uses: actions/setup-python@v5
39+
with:
40+
python-version: "3.x"
41+
42+
- name: Install PlatformIO
43+
run: pip install platformio
44+
45+
- name: Publish to PlatformIO
46+
env:
47+
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }}
48+
run: pio pkg publish --type library --non-interactive

0 commit comments

Comments
 (0)