Skip to content

Commit addf4d5

Browse files
authored
New ci + remove release scripts (#232)
* new ci * new release
1 parent d5cc0dc commit addf4d5

File tree

13 files changed

+182
-178
lines changed

13 files changed

+182
-178
lines changed

.github/workflows/nightly.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Nightly Build
2+
3+
on:
4+
workflow_dispatch:
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-nightly
8+
cancel-in-progress: true
9+
10+
env:
11+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12+
GH_REPO: ${{ github.repository }}
13+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
CARGO_TERM_COLOR: always
15+
16+
jobs:
17+
build:
18+
runs-on: ${{ matrix.os }}
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
include:
23+
- os: windows-latest
24+
platform: windows
25+
steps:
26+
- uses: actions/checkout@v5
27+
28+
- uses: taiki-e/install-action@just
29+
30+
if: matrix.platform == 'windows'
31+
- name: Build lhm
32+
run: just lhm
33+
34+
- name: Build
35+
run: |
36+
FAN_CONTROL_VERSION=nightly just build
37+
38+
if: matrix.platform == 'windows'
39+
- run: rustup update
40+
if: matrix.platform == 'windows'
41+
- uses: Swatinem/rust-cache@v2
42+
if: matrix.platform == 'windows'
43+
- run: cargo install cargo-packager
44+
45+
if: matrix.platform == 'windows'
46+
- name: Package nsis
47+
run: just nsis
48+
49+
if: matrix.platform == 'windows'
50+
- name: Upload windows build
51+
uses: actions/upload-artifact@v5
52+
with:
53+
name: fan-control-windows
54+
path: |
55+
./target/release/fan-control*-setup.exe
56+
57+
release-on-github:
58+
needs:
59+
- build
60+
runs-on: ubuntu-latest
61+
62+
steps:
63+
- uses: actions/checkout@v5
64+
65+
# must be after checkout because it will remove artifacts
66+
- uses: actions/download-artifact@v6
67+
with:
68+
merge-multiple: true
69+
path: all-artifacts
70+
71+
- name: Display structure of downloaded files
72+
run: find all-artifacts -type f | sort
73+
74+
- name: Set prerelease flag
75+
if: ${{ github.event.inputs.prerelease == 'true' }}
76+
run: |
77+
echo "PRERELEASE=--prerelease" >> $GITHUB_ENV
78+
79+
- name: Publish release
80+
run: |
81+
# delete tag/release if needed
82+
gh release delete nightly --yes || true
83+
git push --delete origin nightly || true
84+
85+
git tag nightly
86+
git push origin --tags
87+
88+
# https://cli.github.com/manual/gh_release_create
89+
gh release create nightly --title "nightly " \
90+
--verify-tag --prerelease --generate-notes --target $GITHUB_SHA \
91+
all-artifacts/**/*

.github/workflows/release.yml

Lines changed: 79 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,101 @@
11
name: Release
22

33
on:
4-
release:
5-
types: [created]
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "App version"
8+
required: true
9+
type: string
10+
prerelease:
11+
description: "Is pre-release"
12+
type: boolean
13+
required: false
14+
default: false
615

7-
permissions:
8-
contents: write
16+
concurrency:
17+
group: ${{ github.workflow }}-release
18+
cancel-in-progress: true
919

1020
env:
1121
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
GH_REPO: ${{ github.repository }}
23+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
CARGO_TERM_COLOR: always
1225

1326
jobs:
14-
upload-artifacts:
15-
uses: ./.github/workflows/upload_artifacts.yml
16-
with:
17-
ref: ${{ github.ref_name }}
27+
build:
28+
runs-on: ${{ matrix.os }}
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
include:
33+
- os: windows-latest
34+
platform: windows
35+
steps:
36+
- uses: actions/checkout@v5
37+
38+
- uses: taiki-e/install-action@just
39+
40+
if: matrix.platform == 'windows'
41+
- name: Build lhm
42+
run: just lhm
43+
44+
- name: Build
45+
run: |
46+
FAN_CONTROL_VERSION=${{ inputs.version }} just build
47+
48+
if: matrix.platform == 'windows'
49+
- run: rustup update&
50+
if: matrix.platform == 'windows'
51+
- uses: Swatinem/rust-cache@v2
52+
if: matrix.platform == 'windows'
53+
- run: cargo install cargo-packager
54+
55+
if: matrix.platform == 'windows'
56+
- name: Package nsis
57+
run: just nsis
58+
59+
if: matrix.platform == 'windows'
60+
- name: Upload windows build
61+
uses: actions/upload-artifact@v5
62+
with:
63+
name: fan-control-windows
64+
path: |
65+
./target/release/fan-control*-setup.exe
1866
1967
release-on-github:
2068
needs:
21-
- upload-artifacts
69+
- build
2270
runs-on: ubuntu-latest
2371

2472
steps:
2573
- uses: actions/checkout@v5
2674

2775
# must be after checkout because it will remove artifacts
2876
- uses: actions/download-artifact@v6
77+
with:
78+
merge-multiple: true
79+
path: all-artifacts
80+
81+
- name: Set prerelease flag
82+
if: ${{ github.event.inputs.prerelease == 'true' }}
83+
run: |
84+
echo "PRERELEASE=--prerelease" >> $GITHUB_ENV
2985
3086
- name: Publish release
3187
run: |
32-
gh release upload ${{ github.ref_name }} ./fan-control*/*
88+
# delete tag/release if needed
89+
gh release delete nightly --yes || true
90+
git push --delete origin nightly || true
91+
92+
gh release delete ${{ inputs.version }} --yes || true
93+
git push --delete origin ${{ inputs.version }} || true
94+
95+
git tag ${{ inputs.version }}
96+
git push origin --tags
97+
98+
# https://cli.github.com/manual/gh_release_create
99+
gh release create ${{ inputs.version }} --title "${{ inputs.version }}" \
100+
--verify-tag ${{ env.PRERELEASE }} --generate-notes --target $GITHUB_SHA \
101+
all-artifacts/**/*

.github/workflows/upload_artifacts.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
## [Unreleased]
44

5+
## [25.11.0]
6+
7+
### Added
8+
9+
- tray icon
10+
- start at login
11+
- start minimized
12+
- update deps
13+
- new ui for managing configs (drawer)
14+
515
## [2025.3.0]
616

717
### Fixed

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ repository.workspace = true
2323
keywords.workspace = true
2424

2525
[package.metadata.packager]
26-
version = "2025.3.0"
27-
before-each-package-command = "just build-release"
26+
version = "25.11.0"
2827
identifier = "io.github.wiiznokes.fan-control"
2928
icons = ["res/windows/app_icon.ico"]
3029
resources = ["res/lhmbuild"]

DEV.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ clear && cargo test --package hardware test_time -- --nocapture
66

77
change before release
88

9-
- version in [justfile](./justfile)
109
- version in [metainfo](./res/linux/metainfo.xml)
1110
- version in [Cargo.toml](./Cargo.toml)
1211
- release in [CHANGELOG.md](./CHANGELOG.md)

justfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
set windows-powershell := true
22

3-
export FAN_CONTROL_VERSION := "2025.3.0"
43
export FAN_CONTROL_COMMIT := `git rev-parse --short HEAD`
54
rootdir := ''
65
prefix := '/usr'
@@ -53,8 +52,6 @@ uninstall:
5352

5453
nsis:
5554
cargo packager --release --formats nsis --verbose
56-
New-Item -Path .\packages -ItemType Directory -Force > $null
57-
cp ./target/release/fan-control*-setup.exe ./packages/
5855

5956
################### Test
6057

res/linux/metainfo.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
</screenshots>
6565

6666
<releases>
67-
<release version="2025.3.0" date="2025-03-28">
67+
<release version="25.11.0" date="2025-11-12">
6868
<url type="details">
6969
https://github.com/wiiznokes/fan-control/blob/master/CHANGELOG.md</url>
7070
</release>

scripts/apply_version_and_changen.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

scripts/github_release.sh

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)