Skip to content

Commit c0aea51

Browse files
committed
ci: sync with librtui
Signed-off-by: ZHANG Yuntian <[email protected]>
1 parent fb41119 commit c0aea51

File tree

3 files changed

+40
-19
lines changed

3 files changed

+40
-19
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
make build-dtbo -j$(nproc) KERNELRELEASE=5.10.110-11-rockchip CONFIG_ARCH_MESON=n CONFIG_CPU_RK3399=rockchip CONFIG_CPU_RK3568=rockchip CONFIG_CPU_RK3588=rockchip
6969
;;
7070
linux-rk356x)
71-
make build-dtbo -j$(nproc) KERNELRELEASE=5.10.160-7-rk356x CONFIG_ARCH_MESON=n CONFIG_CPU_RK3399=rockchip CONFIG_CPU_RK3568=rockchip CONFIG_CPU_RK3588=rockchip
71+
make build-dtbo -j$(nproc) KERNELRELEASE=5.10.160-7-rk356x CONFIG_ARCH_MESON=n CONFIG_CPU_RK3399=rockchip CONFIG_CPU_RK3528=rockchip CONFIG_CPU_RK3568=rockchip CONFIG_CPU_RK3588=rockchip
7272
;;
7373
esac
7474
- name: Upload artifacts

.github/workflows/release.yml

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,22 @@ permissions:
1212
jobs:
1313
build:
1414
runs-on: ubuntu-latest
15+
outputs:
16+
distro: ${{ steps.distro_check.outputs.distro }}
1517
steps:
1618
- name: Checkout
1719
uses: actions/checkout@v4
1820
with:
1921
submodules: recursive
2022
fetch-depth: 0
23+
- name: Test
24+
run: |
25+
make test
2126
- name: Build
2227
run: |
2328
sudo apt-get update
2429
sudo apt-get build-dep --no-install-recommends -y .
25-
make deb
30+
make all deb
2631
- name: Workaround actions/upload-artifact#176
2732
run: |
2833
echo "artifacts_path=$(realpath ..)" >> $GITHUB_ENV
@@ -32,10 +37,20 @@ jobs:
3237
name: ${{ github.event.repository.name }}
3338
path: |
3439
${{ env.artifacts_path }}/*.deb
40+
- name: Check if the latest version is releasable
41+
id: distro_check
42+
run: |
43+
version="$(dpkg-parsechangelog -S Version)"
44+
if [[ -n "$(git tag -l "$version")" ]]
45+
then
46+
echo "distro=UNRELEASED" >> "$GITHUB_OUTPUT"
47+
else
48+
echo "distro=$(dpkg-parsechangelog -S Distribution)" >> "$GITHUB_OUTPUT"
49+
fi
3550
release:
3651
runs-on: ubuntu-latest
3752
needs: build
38-
if: ${{ github.event_name == 'workflow_dispatch' && github.ref_name == 'main' }}
53+
if: ${{ github.event_name != 'pull_request' && needs.build.outputs.distro != 'UNRELEASED' }}
3954
steps:
4055
- name: Checkout
4156
uses: actions/checkout@v4
@@ -45,7 +60,8 @@ jobs:
4560
- uses: actions/download-artifact@v4
4661
with:
4762
name: ${{ github.event.repository.name }}
48-
- name: Check if the latest version is releasable
63+
path: .artifacts
64+
- name: Prepare for release
4965
run: |
5066
version="$(dpkg-parsechangelog -S Version)"
5167
echo "version=$version" >> $GITHUB_ENV
@@ -54,32 +70,25 @@ jobs:
5470
echo "$(dpkg-parsechangelog -S Changes)" >> $GITHUB_ENV
5571
echo '```' >> $GITHUB_ENV
5672
echo "EOF" >> $GITHUB_ENV
57-
if [[ -n "$(git tag -l "$version")" ]]
58-
then
59-
echo "distro=UNRELEASED" >> $GITHUB_ENV
60-
else
61-
echo "distro=$(dpkg-parsechangelog -S Distribution)" >> $GITHUB_ENV
62-
fi
6373
echo "$version" > VERSION
6474
if [[ -f pkg.conf.template ]]
6575
then
6676
sed "s/VERSION/$(dpkg-parsechangelog -S Version)/g" pkg.conf.template > pkg.conf
6777
fi
6878
- name: Release
69-
if: env.distro != 'UNRELEASED'
7079
uses: softprops/action-gh-release@v2
7180
with:
7281
tag_name: ${{ env.version }}
7382
body_path: README.md
7483
token: ${{ secrets.GITHUB_TOKEN }}
75-
target_commitish: master
84+
target_commitish: ${{ github.ref_name }}
7685
draft: false
77-
fail_on_unmatched_files: true
86+
fail_on_unmatched_files: false
7887
files: |
79-
*.deb
88+
.artifacts/**/*.deb
89+
pkg.conf
8090
VERSION
8191
- name: Append changelog
82-
if: env.distro != 'UNRELEASED'
8392
uses: softprops/action-gh-release@v2
8493
with:
8594
tag_name: ${{ env.version }}
@@ -88,7 +97,6 @@ jobs:
8897
${{ env.changes }}
8998
append_body: true
9099
- name: Update Test repos
91-
if: env.distro != 'UNRELEASED'
92100
uses: radxa-repo/update-repo-action@main
93101
with:
94102
test-repo: true

Makefile

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ DTBO-ROCKCHIP := $(addprefix arch/arm64/boot/dts/rockchip/overlays/,$(dtb-rockch
1515
DTBO := $(DTBO-AMLOGIC) $(DTBO-ROCKCHIP)
1616
TMP := $(addsuffix .tmp,$(DTBO))
1717

18+
.PHONY: all
19+
all: build
20+
21+
#
22+
# Test
23+
#
24+
.PHONY: test
25+
test:
26+
1827
#
1928
# Build
2029
#
@@ -55,9 +64,13 @@ clean: clean-dtbo
5564
# Release
5665
#
5766
.PHONY: dch
58-
dch: debian/changelog build-doc
59-
EDITOR=true gbp dch --commit --debian-branch=main --release --dch-opt=--upstream
67+
dch: debian/changelog
68+
EDITOR=true gbp dch --ignore-branch --multimaint-merge --commit --release --dch-opt=--upstream
6069

6170
.PHONY: deb
62-
deb: debian build-doc
71+
deb: debian
6372
debuild --no-lintian --lintian-hook "lintian --fail-on error,warning --suppress-tags bad-distribution-in-changes-file -- %p_%v_*.changes" --no-sign -b
73+
74+
.PHONY: release
75+
release:
76+
gh workflow run .github/workflows/new_version.yml --ref $(shell git branch --show-current)

0 commit comments

Comments
 (0)