Build FluidDial Release #22
This file contains hidden or 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: Build FluidDial Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'Release version' | |
| required: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache pip | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Cache PlatformIO | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.platformio | |
| key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install PlatformIO | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install --upgrade platformio | |
| - name: Set release version | |
| run: | | |
| git config user.email "wmb@firmworks.com" | |
| git config user.name "Mitch Bradley" | |
| git tag "${{ github.event.inputs.tag }}" -a -m "Release test" | |
| - name: Create release directory | |
| run: | | |
| mkdir -p release | |
| rm -f release/* | |
| - name: Build | |
| run: | | |
| for env in m5dial cyddial; do | |
| pio run -e $env | |
| pio run -e $env -t build_merged | |
| done | |
| python manifest.py | |
| ls release/* | |
| #- name: Upload binaries | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: FluidDial_firmware | |
| # path: release/* | |
| - name: Create release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ github.event.inputs.tag }} | |
| files: release/* | |
| draft: True | |
| - name: Deploy to fluidnc-releases | |
| uses: datalbry/copy_folder_to_another_repo_action@1.0.0 | |
| env: | |
| API_TOKEN_GITHUB: ${{ secrets.FLUIDDIAL_RELEASE_COPY_TOKEN }} | |
| with: | |
| source_folder: 'release' | |
| destination_repo: 'bdring/fluiddial-releases' | |
| destination_branch: 'main' | |
| destination_folder: releases/${{ github.event.inputs.tag }} | |
| user_email: bdring@buildlog.net | |
| user_name: 'Bart Dring' | |
| commit_msg: Release ${{ github.event.inputs.tag }} |