-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Sensirion/publish-workflow
Added publish workflow
- Loading branch information
Showing
4 changed files
with
96 additions
and
79 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
name: PlatformIO Build | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
pio-environment-list: | ||
type: string | ||
default: '["usage_example"]' | ||
pio-ini-location: | ||
type: string | ||
default: '.' | ||
workflow_call: | ||
inputs: | ||
pio-environment-list: | ||
type: string | ||
default: '["usage_example"]' | ||
pio-ini-location: | ||
type: string | ||
default: "." | ||
|
||
jobs: | ||
platformio-build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
environment: ${{ fromJSON(inputs.pio-environment-list) }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cache/pip | ||
~/.platformio/.cache | ||
key: ${{ runner.os }}-pio | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
- name: Install PlatformIO Core | ||
run: pip install --upgrade platformio | ||
- name: Build examples with 'pio run' | ||
working-directory: ${{ inputs.pio-ini-location }} | ||
run: pio run -e ${{ matrix.environment }} | ||
platformio-build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
environment: ${{ fromJSON(inputs.pio-environment-list) }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cache/pip | ||
~/.platformio/.cache | ||
key: ${{ runner.os }}-pio | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.9" | ||
- name: Install PlatformIO Core | ||
run: pip install --upgrade platformio | ||
- name: Build examples with 'pio run' | ||
working-directory: ${{ inputs.pio-ini-location }} | ||
run: pio run -e ${{ matrix.environment }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
name: PlatformIO Check | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
pio-environment-list: | ||
type: string | ||
default: '["usage_example"]' | ||
pio-ini-location: | ||
type: string | ||
default: '.' | ||
workflow_call: | ||
inputs: | ||
pio-environment-list: | ||
type: string | ||
default: '["usage_example"]' | ||
pio-ini-location: | ||
type: string | ||
default: "." | ||
|
||
jobs: | ||
platformio-check: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
environment: ${{ fromJSON(inputs.pio-environment-list) }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cache/pip | ||
~/.platformio/.cache | ||
key: ${{ runner.os }}-pio | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.9" | ||
- name: Install PlatformIO Core | ||
run: pip install --upgrade platformio | ||
- name: Run 'pio check' | ||
working-directory: ${{ inputs.pio-ini-location }} | ||
run: pio check -e ${{ matrix.environment }} | ||
platformio-check: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
environment: ${{ fromJSON(inputs.pio-environment-list) }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cache/pip | ||
~/.platformio/.cache | ||
key: ${{ runner.os }}-pio | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.9" | ||
- name: Install PlatformIO Core | ||
run: pip install --upgrade platformio | ||
- name: Run 'pio check' | ||
working-directory: ${{ inputs.pio-ini-location }} | ||
run: pio check -e ${{ matrix.environment }} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,39 @@ | ||
name: PIO Lib | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- "[0-9]+.[0-9]+.[0-9]+" | ||
|
||
jobs: | ||
PlatformIO-Check: | ||
uses: ./.github/workflows/platformio_check_template.yml | ||
with: | ||
pio-environment-list: '["esp32dev"]' | ||
pio-ini-location: "./examples/exampleUsage" | ||
PlatformIO-Check: | ||
uses: ./.github/workflows/platformio_check_template.yml | ||
with: | ||
pio-environment-list: '["ble_example", "basicUsage"]' | ||
|
||
PlatformIO-Build: | ||
uses: ./.github/workflows/platformio_build_template.yml | ||
with: | ||
pio-environment-list: '["esp32dev"]' | ||
pio-ini-location: "./examples/exampleUsage" | ||
PlatformIO-Build: | ||
uses: ./.github/workflows/platformio_build_template.yml | ||
needs: PlatformIO-Check | ||
with: | ||
pio-environment-list: '["ble_example", "basicUsage"]' | ||
|
||
PlatformIO-Package: | ||
if: ${{ (github.ref_type != 'tag') && (github.ref_name == 'master') }} | ||
needs: PlatformIO-Build | ||
uses: ./.github/workflows/platformio_publish_template.yml | ||
with: | ||
should-publish: false | ||
|
||
PlatformIO-Publish: | ||
uses: ./.github/workflows/platformio_publish_template.yml | ||
if: ${{ (github.ref_type == 'tag') && (github.ref_name == 'master') }} | ||
needs: PlatformIO-Build | ||
with: | ||
should-publish: true | ||
secrets: | ||
pio-registry-token: ${{ secrets.PIO_MKTSW_TOKEN }} |