Skip to content

Commit

Permalink
added artifact in publish workflow and input 'should-publish'
Browse files Browse the repository at this point in the history
  • Loading branch information
qfisch committed Feb 8, 2024
1 parent 710ca66 commit ba30b1c
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/platformio_publish_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
type: string
description: The user/org that will be the owner of the published package
default: "sensirion"
should-publish:
type: boolean
description: Should the package be published to the registry
default: false
secrets:
pio-registry-token:
description: PlatformIO Token used to login
Expand Down Expand Up @@ -42,12 +46,18 @@ jobs:
cp LICENSE tmp
cp platformio.ini tmp
cp README.md tmp
- name: Create library package
run: pio pkg pack tmp
- name: Upload package archive
uses: actions/upload-artifact@v4
with:
name: pio-library-archive
path: /*.tar.gz
retention-days: 2
- name: Login into PlatformIO
run: pio account login
env:
PLATFORMIO_AUTH_TOKEN: ${{ secrets.pio-registry-token }}
# - name: Run 'pio pkg publish'
# run: pio pkg publish --owner ${{ inputs.pkg-owner }} --no-interactive ./*.tar.gz
- name: Run 'pio pkg publish'
if: ${{ inputs.should-publish }}
run: pio pkg publish --owner ${{ inputs.pkg-owner }} --no-interactive ./*.tar.gz

0 comments on commit ba30b1c

Please sign in to comment.