Skip to content

Commit

Permalink
package
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardobl committed Jul 7, 2024
1 parent f745a58 commit 6857d13
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 5 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build

on:
push:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install PlatformIO
run: pip install -U platformio

- name: Build
run: |
pio run -e ESP32TestNip01
pio run -e ESP32TestNip04
pio run -e ESP32TestNWC
32 changes: 32 additions & 0 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish Package to PlatformIO Registry

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install PlatformIO
run: pip install -U platformio

- name: Update version in library.json
run: |
VERSION=${GITHUB_REF#refs/tags/}
echo "Build version is $VERSION"
sed -i "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" library.json
cat library.json
- name: Publish to PlatformIO Registry
env:
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }}
run: |
pio package publish --no-interactive
4 changes: 2 additions & 2 deletions library.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"maintainer": true,
"name": "rblb",
"url": "https://github.com/riccardobl/nostrduino"
"url": "https://github.com/riccardobl"
},
{
"maintainer": false,
Expand All @@ -28,7 +28,7 @@
},
"version": "1.2.0",
"dependencies": {
"ArduinoJson": "^6.21.1",
"ArduinoJson": "^7.1.0",
"uBitcoin": "^0.2.0",
"WebSockets": "^2.4.1"
}
Expand Down
6 changes: 3 additions & 3 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ build_src_filter = +<../examples/ESP32TestNip01/> +<../src/>
lib_deps =
ArduinoJson@^7.1.0
uBitcoin@^0.2.0
WebSockets@^2.3.5
WebSockets@^2.4.1
Wire
marcoschwartz/LiquidCrystal_I2C@^1.1.4

Expand All @@ -25,7 +25,7 @@ build_src_filter = +<../src/> +<../examples/ESP32TestNip04/>
lib_deps =
ArduinoJson@^7.1.0
uBitcoin@^0.2.0
WebSockets@^2.3.5
WebSockets@^2.4.1
Wire
marcoschwartz/LiquidCrystal_I2C@^1.1.4

Expand All @@ -38,6 +38,6 @@ build_src_filter = +<../src/> +<../examples/ESP32TestNWC/>
lib_deps =
ArduinoJson@^7.1.0
uBitcoin@^0.2.0
WebSockets@^2.3.5
WebSockets@^2.4.1
Wire
marcoschwartz/LiquidCrystal_I2C@^1.1.4

0 comments on commit 6857d13

Please sign in to comment.