diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 751f07387218..1e39b1ea8243 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,3 +31,11 @@ jobs: name: firmware # Directory containing files to upload path: .pio/build/STM32F103RC_btt_512K/artifacts + - name: Automatic Releases + uses: marvinpinto/action-automatic-releases@v1.0.0 + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "Printrbot-Play" + prerelease: false + title: "Printrbot Play - SKR Mini e3" + files: .pio/build/STM32F103RC_btt_512K/artifacts/firmware.bin \ No newline at end of file diff --git a/.github/workflows/check-pr.yml b/.github/workflows/check-pr.yml deleted file mode 100644 index a6246a3786f5..000000000000 --- a/.github/workflows/check-pr.yml +++ /dev/null @@ -1,27 +0,0 @@ -# -# comment-pr.yml -# Add a comment to any PR directed to a release branch -# - -name: PR Bad Target - -on: - pull_request: - branches: - - 1.0.x - - 1.1.x - - 2.0.x - -jobs: - bad_target: - - name: PR Bad Target - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - uses: harupy/comment-on-pr@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - filename: bad-target.md diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml deleted file mode 100644 index d1e938aea632..000000000000 --- a/.github/workflows/nightly.yml +++ /dev/null @@ -1,100 +0,0 @@ -name: Nightly - -on: - repository_dispatch: - types: trigger-nightly - schedule: - - cron: '0 2 * * *' # run at 2 AM UTC - -jobs: - merge: - strategy: - fail-fast: false - matrix: - branch: [bugfix-2.0.x, 2.0.x, bugfix-2.0.x-bltouch] - runs-on: ubuntu-latest - - steps: - - name: Check out ${{ matrix.branch }} - uses: actions/checkout@v2 - with: - ref: ${{ matrix.branch }} - - name: Merge ${{ matrix.branch }} - id: merge - run: | - git fetch --tags --force - BRANCH=${{ matrix.branch }} - MERGE_BRANCH=$(printf '%s\n' "${BRANCH//-bltouch/}") - git config user.name "${GITHUB_ACTOR}" - git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" - git fetch --unshallow - git pull https://github.com/MarlinFirmware/Marlin $MERGE_BRANCH - DATE="$(date '+%Y/%m/%d')" - VERSION_NAME=$(less "Marlin/src/inc/Version.h"| grep "#define SHORT_BUILD_VERSION" | awk -F\" '{ print $2 }') - VERSION_NAME=$(if [[ "${{ matrix.branch }}" == *"-bltouch" ]]; then echo "${VERSION_NAME}-bltouch"; else echo "$VERSION_NAME"; fi) - TAG_NAME=$(if [[ "${{ matrix.branch }}" == "2.0.x"* ]]; then echo "v$VERSION_NAME"; else echo "nightly-${{ matrix.branch }}-$(date '+%Y/%m/%d')"; fi) - PRERELEASE=$(if [[ "${{ matrix.branch }}" == "2.0.x"* ]]; then echo false; else echo true; fi) - TAG_EXISTED=$(if [ $(git tag -l $TAG_NAME) ]; then echo true; else echo false; fi) - RELEASE_NAME=$(if [[ "${{ matrix.branch }}" == "2.0.x"* ]]; then echo "$VERSION_NAME"; else echo "Nighly Build on ${{ matrix.branch }} ($DATE)"; fi) - echo "TAG_NAME=$TAG_NAME" - echo "TAG_EXISTED=$TAG_EXISTED" - echo "##[set-output name=merge_branch_name;]$MERGE_BRANCH" - echo "##[set-output name=tag_existed;]$TAG_EXISTED" - echo "##[set-output name=prerelease;]$PRERELEASE" - echo "##[set-output name=version_name;]$VERSION_NAME" - echo "##[set-output name=tag_name;]$TAG_NAME" - echo "##[set-output name=date;]$DATE" - echo "##[set-output name=release_name;]$RELEASE_NAME" - - name: Set up Python - if: steps.merge.outputs.tag_existed == 'false' - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - name: Install pip - if: steps.merge.outputs.tag_existed == 'false' - run: | - python -m pip install --upgrade pip - - name: Build Marlin - if: steps.merge.outputs.tag_existed == 'false' - run: | - pip install platformio - ./buildroot/bin/generate_version - platformio run - cd .pio/build/STM32F103RC_btt_512K/ - mkdir artifacts - mv firmware.bin artifacts/ - - name: Create and Push Tag ${{ steps.merge.outputs.tag_name }} - if: steps.merge.outputs.tag_existed == 'false' - run: | - MESSAGE=$(if [[ "${{ steps.merge.outputs.tag_name }}" == v* ]]; then echo "Release ${{ steps.merge.outputs.version_name }}"; else echo "Nightly build at ${{ steps.merge.outputs.date }} on ${{ matrix.branch }}"; fi) - git tag -a "${{ steps.merge.outputs.tag_name }}" -m "$MESSAGE" - git push --follow-tags - - name: Upload firmware - if: steps.merge.outputs.tag_existed == 'false' - uses: actions/upload-artifact@v1.0.0 - with: - name: firmware - path: .pio/build/STM32F103RC_btt_512K/artifacts - - name: Create Release - if: steps.merge.outputs.tag_existed == 'false' - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ steps.merge.outputs.tag_name }} - release_name: ${{ steps.merge.outputs.release_name }} - draft: false - prerelease: ${{ steps.merge.outputs.prerelease }} - body: "[firmware.bin](https://github.com/drphil3d/Marlin/releases/download/${{ github.ref }}/firmware.bin)" - - name: Upload Release Asset - if: steps.merge.outputs.tag_existed == 'false' - id: upload-release-asset - uses: actions/upload-release-asset@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: .pio/build/STM32F103RC_btt_512K/artifacts/firmware.bin - asset_name: firmware.bin - asset_content_type: application/zip diff --git a/.github/workflows/test-builds.yml b/.github/workflows/test-builds.yml deleted file mode 100644 index b92b01528781..000000000000 --- a/.github/workflows/test-builds.yml +++ /dev/null @@ -1,104 +0,0 @@ -# -# test-builds.yml -# Do test builds to catch compile errors -# - -name: CI - -on: - pull_request: - branches: - - bugfix-2.0.x - - dev-2.1.x - paths-ignore: - - config/** - - data/** - - docs/** - - '**/*.md' - -jobs: - test_builds: - - runs-on: ubuntu-latest - - strategy: - matrix: - test-platform: - # Base Environments - - - DUE - - esp32 - - linux_native - - mega2560 - - teensy31 - - teensy35 - - SAMD51_grandcentral_m4 - - # Extended AVR Environments - - - FYSETC_F6_13 - - mega1280 - - rambo - - sanguino1284p - - sanguino644p - - # Extended STM32 Environments - - - STM32F103RC_btt - - STM32F103RC_btt_USB - - STM32F103RE_btt - - STM32F103RE_btt_USB - - STM32F103RC_fysetc - - jgaurora_a5s_a1 - - STM32F103VE_longer - - STM32F407VE_black - - BIGTREE_SKR_PRO - - BIGTREE_GTR_V1_0 - - mks_robin - - ARMED - - FYSETC_S6 - - # Put lengthy tests last - - - LPC1768 - - LPC1769 - - # STM32 with non-STM framework. both broken for now. they should use HAL_STM32 which is working. - - #- STM32F4 - #- STM32F7 - - # Non-working environment tests - - #- BIGTREE_BTT002 - #- at90usb1286_cdc - #- at90usb1286_dfu - #- STM32F103CB_malyan - #- mks_robin_lite - #- mks_robin_mini - #- mks_robin_nano - - steps: - - - name: Select Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: '3.7' # Version range or exact version of a Python version to use, using semvers version range syntax. - architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified - - - name: Install PlatformIO - run: | - pip install -U https://github.com/platformio/platformio-core/archive/master.zip - platformio update - - - name: Check out the PR - uses: actions/checkout@v2 - - - name: Run ${{ matrix.test-platform }} Tests - run: | - # Inline tests script - [[ "$GITHUB_REPOSITORY" == "MarlinFirmware/Marlin" ]] || exit 0 - chmod +x buildroot/bin/* - chmod +x buildroot/share/tests/* - export PATH=./buildroot/bin/:./buildroot/share/tests/:${PATH} - run_tests . ${{ matrix.test-platform }}