Publish Package to PlatformIO Registry #18
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Package to PlatformIO Registry | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- 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 |