From 0324a92037f1c830fa1c9e440024211d423dbea5 Mon Sep 17 00:00:00 2001 From: Ivan Potiienko Date: Mon, 31 Aug 2026 22:28:13 +0200 Subject: Make release automation resilient to token expiry --- .github/workflows/package.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to '.github/workflows/package.yml') diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index c34080b..7c1867c 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -66,7 +66,7 @@ jobs: - name: Upload to release if: github.event_name == 'release' || github.event.inputs.release_tag env: - GH_TOKEN: ${{ secrets.RELEASE_TOKEN }} + GH_TOKEN: ${{ github.token }} RELEASE_TAG: ${{ github.event.release.tag_name || github.event.inputs.release_tag }} run: | install -m 0644 "${{ steps.find-deb.outputs.path }}" \ @@ -140,7 +140,7 @@ jobs: - name: Upload to release if: github.event_name == 'release' || github.event.inputs.release_tag env: - GH_TOKEN: ${{ secrets.RELEASE_TOKEN }} + GH_TOKEN: ${{ github.token }} RELEASE_TAG: ${{ github.event.release.tag_name || github.event.inputs.release_tag }} run: | install -m 0644 "${{ steps.find-rpm.outputs.path }}" \ @@ -163,6 +163,8 @@ jobs: GH_TOKEN: ${{ secrets.RELEASE_TOKEN }} RELEASE_TAG: ${{ github.event.release.tag_name || github.event.inputs.release_tag }} run: | - gh api --method POST repos/xxanqw/apt-repository/dispatches \ + if ! gh api --method POST repos/xxanqw/apt-repository/dispatches \ --raw-field event_type=new-release \ - --field "client_payload[tag_name]=$RELEASE_TAG" + --field "client_payload[tag_name]=$RELEASE_TAG"; then + echo "::warning::Could not dispatch apt-repository; its daily schedule will publish the release. Check RELEASE_TOKEN if immediate updates are required." + fi -- cgit v1.3-2-g0d8e