Skip to content

Commit

Permalink
auto-publish new releases to PIO
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Aug 23, 2021
1 parent b221759 commit 3e0cee1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/build_platformIO.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,42 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: get latest release version number
id: latest_ver
run: echo "::set-output name=release::$(awk -F "=" '/version/ {print $2}' library.properties)"

- name: Set up Python
uses: actions/setup-python@v2

- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: package lib
run: pio package pack -o PlatformIO-RF24Network-${{ steps.latest_ver.outputs.release }}.tar.gz

- name: Save artifact
uses: actions/upload-artifact@v2
with:
name: "PIO_pkg_RF24Network"
path: PlatformIO*.tar.gz

- name: Upload Release assets
if: github.event_name == 'release'
uses: csexton/release-asset-action@master
with:
pattern: "PlatformIO*.tar.gz"
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: upload package to PlatformIO Registry
if: github.event_name == 'release' && github.event_type != 'edited'
# PIO lib packages cannot be re-published under the same tag
env:
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }}
run: pio package publish --owner nrf24

check_formatting:
runs-on: ubuntu-latest

Expand Down

0 comments on commit 3e0cee1

Please sign in to comment.