config tag-name #13
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: Change to Project Directory | |
# run: cd SRC/MBusinoAP/ # Ersetzen Sie dies durch den Pfad zu Ihrem Projekt, falls erforderlich | |
- name: Build PlatformIO Project | |
run: pio run | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: firmware-binaries | |
path: | | |
.pio/build/**/firmware.bin | |
- name: Generate Tag Name | |
id: tag_name | |
run: echo "##[set-output name=tag;]release-$(date +'%Y%m%d%H%M%S')" | |
- name: Create Release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.tag_name.outputs.tag }} | |
release_name: Release ${{ steps.tag_name.outputs.tag }} | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./.pio/build/d1_mini/firmware.bin | |
asset_name: firmware.bin | |
asset_content_type: application/octet-stream |