Nightly release #1
Workflow file for this run
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: Nightly release | |
| on: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-nightly | |
| cancel-in-progress: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GH_REPO: ${{ github.repository }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: windows-latest | |
| platform: windows | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: taiki-e/install-action@just | |
| if: matrix.platform == 'windows' | |
| - name: Build lhm | |
| run: just lhm | |
| - run: rustup update | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Build | |
| run: | | |
| FAN_CONTROL_VERSION=nightly just build | |
| shell: bash | |
| if: matrix.platform == 'windows' | |
| - run: cargo install cargo-packager | |
| if: matrix.platform == 'windows' | |
| - name: Package nsis | |
| run: just nsis | |
| if: matrix.platform == 'windows' | |
| - name: Upload windows build | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: fan-control-windows | |
| path: | | |
| ./target/release/fan-control*-setup.exe | |
| release-on-github: | |
| needs: | |
| - build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| # must be after checkout because it will remove artifacts | |
| - uses: actions/download-artifact@v6 | |
| with: | |
| merge-multiple: true | |
| path: all-artifacts | |
| - name: Display structure of downloaded files | |
| run: find all-artifacts -type f | sort | |
| - name: Set prerelease flag | |
| if: ${{ github.event.inputs.prerelease == 'true' }} | |
| run: | | |
| echo "PRERELEASE=--prerelease" >> $GITHUB_ENV | |
| - name: Publish release | |
| run: | | |
| # delete tag/release if needed | |
| gh release delete nightly --yes || true | |
| git push --delete origin nightly || true | |
| git tag nightly | |
| git push origin --tags | |
| # https://cli.github.com/manual/gh_release_create | |
| gh release create nightly --title "nightly " \ | |
| --verify-tag --prerelease --generate-notes --target $GITHUB_SHA \ | |
| all-artifacts/**/* |