Skip to content

Commit b328e87

Browse files
committed
ci: publish Debian packages to releases only
1 parent 384a1a1 commit b328e87

4 files changed

Lines changed: 10 additions & 47 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ jobs:
7676
needs: kernel-4-15
7777
outputs:
7878
version: ${{ steps.version.outputs.version }}
79-
source_revision: ${{ steps.version.outputs.source_revision }}
8079
env:
8180
KERNEL_RELEASE: 4.15.0-60-generic
8281
KERNEL_ARCHITECTURE: i386
@@ -128,7 +127,6 @@ jobs:
128127
*) ;;
129128
esac
130129
printf 'version=%s\n' "$version" >> "$GITHUB_OUTPUT"
131-
printf 'source_revision=%s\n' "$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
132130
printf 'Building USBDisplayStack version %s\n' "$version"
133131
134132
- name: Build and package with PCCT
@@ -175,21 +173,17 @@ jobs:
175173
dist-pcct/install-usbdisplay-offline.sh
176174
177175
publish-tag:
178-
name: publish tagged Debian package
176+
name: publish tagged Debian release
179177
if: >-
180178
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) ||
181179
(github.event_name == 'workflow_dispatch' && inputs.release_tag != '')
182180
runs-on: ubuntu-latest
183181
needs: debian-package
184182
permissions:
185183
contents: write
186-
packages: write
187184
env:
188185
GH_REPO: ${{ github.repository }}
189-
OCI_PACKAGE: ghcr.io/iotsharp/usbdisplaystack-deb
190-
PACKAGE_VERSION: ${{ needs.debian-package.outputs.version }}
191186
RELEASE_TAG: ${{ inputs.release_tag || github.ref_name }}
192-
SOURCE_REVISION: ${{ needs.debian-package.outputs.source_revision }}
193187
steps:
194188
- name: Download Debian package
195189
uses: actions/download-artifact@v4
@@ -220,31 +214,3 @@ jobs:
220214
--generate-notes
221215
fi
222216
gh release upload "$RELEASE_TAG" "${assets[@]}" --clobber
223-
224-
- name: Install ORAS
225-
uses: oras-project/setup-oras@v1
226-
227-
- name: Publish Debian package to GitHub Packages
228-
shell: bash
229-
env:
230-
GHCR_TOKEN: ${{ github.token }}
231-
run: |
232-
set -eu
233-
package=$(find dist-pcct -maxdepth 1 -type f -name '*.deb' -print -quit)
234-
checksum="${package}.sha256"
235-
installer=dist-pcct/install-usbdisplay-offline.sh
236-
test -f "$package"
237-
test -f "$checksum"
238-
test -f "$installer"
239-
printf '%s' "$GHCR_TOKEN" | oras login ghcr.io \
240-
--username "$GITHUB_ACTOR" \
241-
--password-stdin
242-
oras push "$OCI_PACKAGE:$RELEASE_TAG" \
243-
--artifact-type application/vnd.iotsharp.usbdisplaystack.debian.v1 \
244-
--annotation "org.opencontainers.image.source=https://github.com/$GITHUB_REPOSITORY" \
245-
--annotation "org.opencontainers.image.revision=$SOURCE_REVISION" \
246-
--annotation "org.opencontainers.image.version=$PACKAGE_VERSION" \
247-
--annotation "org.opencontainers.image.title=USBDisplayStack Debian package" \
248-
"$package:application/vnd.debian.binary-package" \
249-
"$checksum:text/plain" \
250-
"$installer:application/vnd.iotsharp.usbdisplaystack.installer.v1+shell"

‎CHANGELOG.md‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
## Unreleased
44

5-
- Publish tagged Debian artifacts to the matching GitHub Release and mirror
6-
them to GitHub Packages as a versioned GHCR OCI artifact.
5+
- Publish tagged Debian artifacts to the matching GitHub Release.
76
- Render a redesigned connection-status splash with the project URL, support
87
QQ, and PCCT-injected package version while no fbdev or DRM producer is open,
98
and restore it when the last producer exits.

‎README.md‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,11 @@ pwsh ./scripts/build-pcct-deb.ps1 \
214214
GitHub Actions runs the same PCCT packaging path on every push and pull request.
215215
It uploads the `.deb`, its SHA-256 sidecar, and the offline installer as a
216216
workflow artifact. A `vX.Y.Z` tag uses `X.Y.Z` and also publishes those files to
217-
the matching GitHub Release. The same tagged files are mirrored in GitHub
218-
Packages as the OCI artifact `ghcr.io/iotsharp/usbdisplaystack-deb:vX.Y.Z`;
219-
GitHub Packages does not provide a native Debian/APT package registry. The
220-
manual workflow dispatch can override the artifact version without publishing.
217+
the matching GitHub Release. GitHub Packages is not used because it does not
218+
provide a native Debian/APT package registry. The manual workflow dispatch can
219+
override the artifact version without publishing.
221220
Maintainers can instead set `release_tag` to an existing `vX.Y.Z` tag to rebuild
222-
that tag and recover its Release and Package assets.
221+
that tag and recover its Release assets.
223222

224223
The package contains its Debian lifecycle hooks and all project installation
225224
scripts. It deliberately does not activate the module or select the physical

‎README.zh-CN.md‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,10 @@ pwsh ./scripts/build-pcct-deb.ps1 \
190190

191191
GitHub Actions 会在每次 push 和 pull request 时执行同一套 PCCT 打包流程,并上传
192192
`.deb`、SHA-256 校验文件和离线安装脚本作为 workflow artifact。推送 `vX.Y.Z`
193-
标签时使用 `X.Y.Z` 作为包版本,并把这三个文件上传到同名 GitHub Release;同时
194-
以 OCI artifact `ghcr.io/iotsharp/usbdisplaystack-deb:vX.Y.Z` 镜像到 GitHub
195-
Packages。GitHub Packages 本身不提供原生 Debian/APT 软件源类型。手动运行
196-
workflow 时只填写版本号不会发布;维护者也可以把 `release_tag` 设为已有的
197-
`vX.Y.Z` 标签,从该标签重建并恢复对应的 Release 和 Package 资产。
193+
标签时使用 `X.Y.Z` 作为包版本,并把这三个文件上传到同名 GitHub Release。
194+
GitHub Packages 不提供原生 Debian/APT 软件源类型,因此不用于发布 DEB。手动
195+
运行 workflow 时只填写版本号不会发布;维护者也可以把 `release_tag` 设为已有的
196+
`vX.Y.Z` 标签,从该标签重建并恢复对应的 Release 资产。
198197

199198
DEB 已包含 Debian 生命周期脚本和项目的全部安装/卸载脚本。出于现场安全和
200199
replay 授权边界,安装后仍不会自动加载模块、选择实体后端或启动服务。离线安装、

0 commit comments

Comments
 (0)