test dev dro pwith other release action #14
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: PlatformIO CI | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
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: write temp file with build number and set to env variable | |
# run: | | |
# touch ${{ github.workspace }}/include/buildnumber.txt | |
# printf -v BUILDNUMBER "%04ddev" ${{github.run_number}} | |
# echo $BUILDNUMBER >> ${{ github.workspace }}/hooks/buildnumber.txt | |
# echo "cat ../buildnumber.txt" | |
# cat ${{ github.workspace }}/hooks/buildnumber.txt | |
# echo "CURRENT_BUILDNUMBER=$BUILDNUMBER" >> $GITHUB_ENV | |
- name: Build PlatformIO Project | |
run: pio run | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dtuGatewayFirmware_${{github.run_number}}.bin | |
path: .pio/build/esp12e/firmware.bin | |
- uses: pyTooling/Actions/releaser@r0 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: devRelease | |
files: | | |
.pio/build/esp12e/firmware.bin | |
include/version.json | |
# - name: Create Dev Release | |
# id: create_release | |
# uses: actions/create-release@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# tag_name: devRelease | |
# release_name: dev drop | |
# body: | | |
# dev release based on direct pushes | |
# draft: true | |
# prerelease: false | |
# - name: Upload Release Asset | |
# id: upload-release-asset | |
# uses: actions/upload-release-asset@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | |
# asset_path: .pio/build/esp12e/firmware.bin | |
# asset_name: dtuGatewayFirmware_${{github.run_number}}.bin | |
# asset_content_type: application/x-binary | |