|
80 | 80 | name: debian-latest |
81 | 81 | path: release |
82 | 82 |
|
| 83 | + build-f41: |
| 84 | + name: Build Fedora 41 package |
| 85 | + runs-on: ubuntu-latest |
| 86 | + container: |
| 87 | + image: registry.fedoraproject.org/fedora:41 |
| 88 | + options: --security-opt seccomp=unconfined |
| 89 | + steps: |
| 90 | + - name: Checkout code |
| 91 | + uses: actions/checkout@v3 |
| 92 | + |
| 93 | + - name: Install build dependencies |
| 94 | + run: | |
| 95 | + dnf distro-sync -y |
| 96 | + dnf install -y make rpmdevtools rpm-sign 'dnf-command(builddep)' |
| 97 | + dnf builddep -y pkg/fedora/libwacom-surface.spec |
| 98 | +
|
| 99 | + - name: Build package |
| 100 | + run: | |
| 101 | + cd pkg/fedora |
| 102 | +
|
| 103 | + # Build the .rpm packages |
| 104 | + ./makerpm |
| 105 | +
|
| 106 | + - name: Sign packages |
| 107 | + env: |
| 108 | + GPG_KEY_ID: 56C464BAAC421453 |
| 109 | + GPG_KEY: ${{ secrets.LINUX_SURFACE_GPG_KEY }} |
| 110 | + run: | |
| 111 | + cd pkg/fedora/out |
| 112 | +
|
| 113 | + # import GPG key |
| 114 | + echo "$GPG_KEY" | base64 -d | gpg --import --no-tty --batch --yes |
| 115 | +
|
| 116 | + # sign package |
| 117 | + cd noarch |
| 118 | + rpm --resign *.rpm --define "_gpg_name $GPG_KEY_ID" |
| 119 | +
|
| 120 | + cd .. |
| 121 | +
|
| 122 | + cd x86_64 |
| 123 | + rpm --resign *.rpm --define "_gpg_name $GPG_KEY_ID" |
| 124 | +
|
| 125 | + - name: Prepare artifacts |
| 126 | + run: | |
| 127 | + cd pkg/fedora |
| 128 | + mkdir release |
| 129 | +
|
| 130 | + cp out/noarch/* release/ |
| 131 | + cp out/x86_64/* release/ |
| 132 | +
|
| 133 | + rm release/libwacom-surface-devel-* |
| 134 | +
|
| 135 | + - name: Upload artifacts |
| 136 | + uses: actions/upload-artifact@v3 |
| 137 | + with: |
| 138 | + name: fedora-41-latest |
| 139 | + path: pkg/fedora/release |
| 140 | + |
83 | 141 | build-f40: |
84 | 142 | name: Build Fedora 40 package |
85 | 143 | runs-on: ubuntu-latest |
@@ -198,7 +256,7 @@ jobs: |
198 | 256 |
|
199 | 257 | release: |
200 | 258 | name: Publish release |
201 | | - needs: [build-deb, build-f40, build-f39] |
| 259 | + needs: [build-deb, build-f41, build-f40, build-f39] |
202 | 260 | runs-on: ubuntu-latest |
203 | 261 | steps: |
204 | 262 | - name: Download Debian artifacts |
@@ -280,6 +338,59 @@ jobs: |
280 | 338 | git commit -m "Update Debian libwacom" |
281 | 339 | git push --set-upstream origin "${update_branch}" |
282 | 340 |
|
| 341 | + repo-f41: |
| 342 | + name: Update Fedora 41 package repository |
| 343 | + needs: [release] |
| 344 | + runs-on: ubuntu-latest |
| 345 | + container: |
| 346 | + image: registry.fedoraproject.org/fedora:41 |
| 347 | + options: --security-opt seccomp=unconfined |
| 348 | + steps: |
| 349 | + - name: Install dependencies |
| 350 | + run: | |
| 351 | + dnf install -y git findutils |
| 352 | +
|
| 353 | + - name: Download artifacts |
| 354 | + uses: actions/download-artifact@v3 |
| 355 | + with: |
| 356 | + name: fedora-41-latest |
| 357 | + path: fedora-41-latest |
| 358 | + |
| 359 | + - name: Update repository |
| 360 | + env: |
| 361 | + SURFACEBOT_TOKEN: ${{ secrets.LINUX_SURFACE_BOT_TOKEN }} |
| 362 | + BRANCH_STAGING: u/staging |
| 363 | + GIT_REF: ${{ github.ref }} |
| 364 | + run: | |
| 365 | + repo="https://surfacebot:${SURFACEBOT_TOKEN}@github.com/linux-surface/repo.git" |
| 366 | +
|
| 367 | + # clone package repository |
| 368 | + git clone -b "${BRANCH_STAGING}" "${repo}" repo |
| 369 | +
|
| 370 | + # copy packages |
| 371 | + cp fedora-41-latest/* repo/fedora/f41 |
| 372 | + cd repo/fedora/f41 |
| 373 | +
|
| 374 | + # parse git tag from ref |
| 375 | + GIT_TAG=$(echo $GIT_REF | sed 's|^refs/tags/||g') |
| 376 | +
|
| 377 | + # convert packages into references |
| 378 | + for pkg in $(find . -name '*.rpm'); do |
| 379 | + echo "libwacom-surface:$GIT_TAG/$(basename $pkg)" > $pkg.blob |
| 380 | + rm $pkg |
| 381 | + done |
| 382 | +
|
| 383 | + # set git identity |
| 384 | + git config --global user.email "[email protected]" |
| 385 | + git config --global user.name "surfacebot" |
| 386 | +
|
| 387 | + # commit and push |
| 388 | + update_branch="${BRANCH_STAGING}-$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)" |
| 389 | + git checkout -b "${update_branch}" |
| 390 | + git add . |
| 391 | + git commit -m "Update Fedora 41 libwacom" |
| 392 | + git push --set-upstream origin "${update_branch}" |
| 393 | +
|
283 | 394 | repo-f40: |
284 | 395 | name: Update Fedora 40 package repository |
285 | 396 | needs: [release] |
|
0 commit comments