-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (35 loc) · 1.16 KB
/
Update library.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Update library version in library.json and upload to platformio
on:
release:
types: [published]
jobs:
Update-Library:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: false
- name: Set up Python
uses: actions/setup-python@v2
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Update version
run: |
find library.json -type f -exec sed -i "s/\"version.*,/\"version\": \"${{github.ref_name}}\",/g" {} \;
- name: Commit and push changes
run: |
git config --global user.name "timherreijgers"
git config --global user.email "timtim3001@gmail.com"
git fetch
git switch master
git add -A
git commit -m "Updated version to ${{github.ref_name}}"
git push --force
- name: Log into platformio
run: |
pio account login -u ${{secrets.PIO_USERNAME}} -p ${{secrets.PIO_PASSWORD}}
- name: Add to platformio registry
run: |
pio pkg publish --no-interactive