|
76 | 76 | needs: kernel-4-15 |
77 | 77 | outputs: |
78 | 78 | version: ${{ steps.version.outputs.version }} |
79 | | - source_revision: ${{ steps.version.outputs.source_revision }} |
80 | 79 | env: |
81 | 80 | KERNEL_RELEASE: 4.15.0-60-generic |
82 | 81 | KERNEL_ARCHITECTURE: i386 |
@@ -128,7 +127,6 @@ jobs: |
128 | 127 | *) ;; |
129 | 128 | esac |
130 | 129 | printf 'version=%s\n' "$version" >> "$GITHUB_OUTPUT" |
131 | | - printf 'source_revision=%s\n' "$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" |
132 | 130 | printf 'Building USBDisplayStack version %s\n' "$version" |
133 | 131 |
|
134 | 132 | - name: Build and package with PCCT |
@@ -175,21 +173,17 @@ jobs: |
175 | 173 | dist-pcct/install-usbdisplay-offline.sh |
176 | 174 |
|
177 | 175 | publish-tag: |
178 | | - name: publish tagged Debian package |
| 176 | + name: publish tagged Debian release |
179 | 177 | if: >- |
180 | 178 | (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) || |
181 | 179 | (github.event_name == 'workflow_dispatch' && inputs.release_tag != '') |
182 | 180 | runs-on: ubuntu-latest |
183 | 181 | needs: debian-package |
184 | 182 | permissions: |
185 | 183 | contents: write |
186 | | - packages: write |
187 | 184 | env: |
188 | 185 | GH_REPO: ${{ github.repository }} |
189 | | - OCI_PACKAGE: ghcr.io/iotsharp/usbdisplaystack-deb |
190 | | - PACKAGE_VERSION: ${{ needs.debian-package.outputs.version }} |
191 | 186 | RELEASE_TAG: ${{ inputs.release_tag || github.ref_name }} |
192 | | - SOURCE_REVISION: ${{ needs.debian-package.outputs.source_revision }} |
193 | 187 | steps: |
194 | 188 | - name: Download Debian package |
195 | 189 | uses: actions/download-artifact@v4 |
@@ -220,31 +214,3 @@ jobs: |
220 | 214 | --generate-notes |
221 | 215 | fi |
222 | 216 | 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" |
0 commit comments