Generate beta release notes #557
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: CI | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - 'docs/**' | |
| release: | |
| types: | |
| - published | |
| pull_request: | |
| paths-ignore: | |
| - 'docs/**' | |
| jobs: | |
| build: | |
| runs-on: windows-2022 | |
| env: | |
| VERSION: ${{github.event.release.tag_name}} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: falti/dotenv-action@v1.1.5 | |
| id: dotenv | |
| - name: Download/Unpack MSYS | |
| shell: bash | |
| run: | | |
| curl -L -O ${{ steps.dotenv.outputs.msys_url }} | |
| tar -xvf msys2-base-x86_64-*.tar.xz --one-top-level=.build | |
| - name: Download/Unpack ConEmu | |
| shell: bash | |
| run: | | |
| curl -L -O ${{ steps.dotenv.outputs.conemu_url }} | |
| 7z x ConEmuPack.*.7z -o.build/msys64/conemu/ | |
| - name: Download Driver Installer | |
| shell: bash | |
| run: | | |
| mkdir .build/drivers/ | |
| curl -L --output-dir .build/drivers/ -O https://raw.githubusercontent.com/qmk/qmk_firmware/master/util/drivers.txt | |
| curl -L --output-dir .build/drivers/ -O https://github.com/qmk/qmk_driver_installer/releases/download/v1.01/qmk_driver_installer.exe | |
| - name: Update MSYS | |
| run: | | |
| .build\msys64\msys2_shell.cmd -mingw64 -defterm -no-start -c "pacman -Syu --noconfirm || true" | |
| .build\msys64\msys2_shell.cmd -mingw64 -defterm -no-start -c "pacman -Syu --noconfirm" | |
| .build\msys64\msys2_shell.cmd -mingw64 -defterm -no-start -c "pacman -Su --noconfirm" | |
| - name: Install CLI | |
| run: | | |
| .build\msys64\msys2_shell.cmd -mingw64 -defterm -no-start -c "pacman --needed --noconfirm --disable-download-timeout -S pactoys" | |
| .build\msys64\msys2_shell.cmd -mingw64 -defterm -no-start -c "pacboy sync --needed --noconfirm --disable-download-timeout base-devel: toolchain:x clang:x tree: git: jq:x ripgrep:x python-appdirs:x python-qmk:x hidapi:x" | |
| - name: Install QMK Additional Tools | |
| run: | | |
| .build\msys64\msys2_shell.cmd -mingw64 -defterm -no-start -c "mkdir -p /opt/uv/bin" | |
| .build\msys64\msys2_shell.cmd -mingw64 -defterm -no-start -c "export UV_NO_MODIFY_PATH=1 && export UV_PYTHON_INSTALL_DIR=/opt/uv/bin && curl -fsSL https://install.qmk.fm | sh -s -- --confirm --skip-qmk-cli --skip-windows-drivers" | |
| - name: Test QMK cli version | |
| run: | | |
| .build\msys64\msys2_shell.cmd -mingw64 -defterm -no-start -c "qmk --version | grep -F ${{ steps.dotenv.outputs.qmk_cli_ver }}" | |
| - name: Patch Up MSYS | |
| shell: 'bash {0}' | |
| run: | | |
| rm -rf .build/msys64/home/* | |
| rm -rf .build/msys64/dev/* | |
| rm -rf .build/msys64/etc/mtab | |
| rm -rf .build/msys64/etc/hosts | |
| rm -rf .build/msys64/var/cache/pacman/pkg/* | |
| rm -f .build/msys64/*.exe | |
| rm -f .build/msys64/*.ico | |
| rm -f .build/msys64/msys2_shell.cmd | |
| mkdir -p .build/msys64/dev/shm | |
| mkdir -p .build/msys64/dev/mqueue | |
| cp -rf src/* .build/msys64/ | |
| echo "VERSION_ID=$GITHUB_SHA" >> .build/msys64/etc/qmk-release | |
| echo "VERSION=${VERSION:-2.0.0}" >> .build/msys64/etc/qmk-release | |
| - name: Create Installer | |
| shell: 'bash {0}' | |
| run: | | |
| iscc installer/install.iss //DMyAppVersion=${VERSION:-2.0.0} | |
| sha256sum .build/QMK_MSYS.exe > .build/QMK_MSYS.exe.sha256 | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: installer | |
| path: .build/QMK_MSYS.* | |
| include-hidden-files: true | |
| test: | |
| runs-on: windows-latest | |
| needs: [build] | |
| steps: | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: installer | |
| - name: Run Install | |
| run: | | |
| Start-Process QMK_MSYS.exe -ArgumentList "/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /DIR=expand:{autopf}\QMK_MSYS" -wait | |
| - name: Run QMK cli | |
| env: | |
| MSYSTEM: MINGW64 | |
| shell: cmd | |
| run: | | |
| "%ProgramFiles%\QMK_MSYS\usr\bin\bash.exe" -l -c 'qmk -h' | findstr /c:"CLI wrapper for running QMK commands" | |
| publish_release: | |
| runs-on: ubuntu-latest | |
| needs: [test] | |
| if: github.event.release.tag_name | |
| steps: | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: installer | |
| path: .build | |
| - uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| name: ${{ github.event.release.name }} | |
| files: | | |
| .build/* | |
| publish_beta: | |
| runs-on: ubuntu-latest | |
| needs: [test] | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-tags: true | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: installer | |
| path: .build | |
| - name: Delete release | |
| run: gh release delete beta --cleanup-tag || true | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| - uses: softprops/action-gh-release@v2 | |
| with: | |
| token: "${{ secrets.GITHUB_TOKEN }}" | |
| tag_name: "beta" | |
| prerelease: true | |
| generate_release_notes: true | |
| name: "Latest Beta" | |
| files: | | |
| .build/*.exe | |
| .build/*.exe.sha256 |