diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 5fec929..b759d9c 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -16,7 +16,7 @@ jobs: - name: Setup Arduino CLI uses: arduino/setup-arduino-cli@v1.1.1 - - name: Install platform + - name: Install Arduino platform and libraries run: | arduino-cli core update-index arduino-cli core install arduino:avr @@ -24,13 +24,13 @@ jobs: arduino-cli lib install "Adafruit SSD1306" arduino-cli lib install SimpleRotary - - name: Compile Sketch + - name: Compile sketch and rename output file for release working-directory: ./${{ matrix.module}} run: | arduino-cli compile -v -b arduino:avr:nano ${{ matrix.firmware}} -e --output-dir=./build mkdir -p ./release && cp ./build/${{ matrix.firmware }}.ino.hex ./release/${{ matrix.module}}_${{ matrix.firmware }}.hex - - name: Upload bin + - name: Upload release artifacts uses: actions/upload-artifact@v2 with: name: release-artifacts @@ -51,18 +51,18 @@ jobs: - name: Setup Arduino CLI uses: arduino/setup-arduino-cli@v1.1.1 - - name: Install platform + - name: Install Arduino platform and libraries run: | arduino-cli core update-index arduino-cli core install arduino:avr - - name: Compile Sketch + - name: Compile sketch and rename output file for release working-directory: ./${{ matrix.module}} run: | - ARDUINO_DIRECTORIES_USER=$GITHUB_WORKSPACE/${{ matrix.module}} arduino-cli compile -v -b arduino:avr:nano ${{ matrix.firmware}} -e --output-dir=./build + arduino-cli compile -v -b arduino:avr:nano ${{ matrix.firmware}} -e --output-dir=./build mkdir -p ./release && cp ./build/${{ matrix.firmware }}.ino.hex ./release/${{ matrix.module}}_${{ matrix.firmware }}.hex - - name: Upload bin + - name: Upload release artifacts uses: actions/upload-artifact@v2 with: name: release-artifacts @@ -73,12 +73,14 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/download-artifact@master + - name: Download release artifacts + uses: actions/download-artifact@master + if: startsWith(github.ref, 'refs/tags/') with: name: release-artifacts path: releases/ - - name: Create Release + - name: Create Release and attach files uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: