Fix pypi packaging trigger again (#8512)
authorGereon Kremer <gkremer@cs.stanford.edu>
Fri, 1 Apr 2022 17:33:03 +0000 (19:33 +0200)
committerGitHub <noreply@github.com>
Fri, 1 Apr 2022 17:33:03 +0000 (10:33 -0700)
Further workflows are not triggered when the GITHUB_TOKEN is used. This PR creates new releases using the ACTION_USER_TOKEN instead.

.github/actions/store-binary/action.yml
.github/workflows/ci.yml

index 9e339f8d4609831fcc1ee7dbfb2c8131bbd2b939..6eac33625dd8e5116c91a2d08b27026729516c5a 100644 (file)
@@ -5,8 +5,10 @@ inputs:
     description: file name of binary
   binary-name:
     description: target name of binary
-  github-token:
-    description: token to upload binary
+  github-token-latest:
+    description: token to upload binary to latest
+  github-token-release:
+    description: token to upload binary to release
 runs:
   using: composite
   steps:
@@ -24,7 +26,7 @@ runs:
       if: github.ref == 'refs/heads/main'
       shell: 'python3 {0}'
       env:
-        GITHUB_TOKEN: ${{ inputs.github-token }}
+        GITHUB_TOKEN: ${{ inputs.github-token-latest }}
         BINARY: ${{ inputs.binary-name }}
       run: |
         import datetime
@@ -81,7 +83,7 @@ runs:
       if: startsWith(github.ref, 'refs/tags/')
       shell: 'python3 {0}'
       env:
-        GITHUB_TOKEN: ${{ inputs.github-token }}
+        GITHUB_TOKEN: ${{ inputs.github-token-release }}
         BINARY: ${{ inputs.binary-name }}
       run: |
         import os
index 4bdd2688fcc7f1f997c87e4d1719f2c798d3effb..6173b741bd5907949c3deebd3b3f320cbf507054 100644 (file)
@@ -133,7 +133,9 @@ jobs:
       with:
         binary: ${{ steps.configure-and-build.outputs.static-build-dir }}/bin/cvc5${{ matrix.binary-ext }}
         binary-name: ${{ matrix.binary-name }}
-        github-token: ${{ secrets.GITHUB_TOKEN }}
+        # when using GITHUB_TOKEN, no further workflows are triggered
+        github-token-latest: ${{ secrets.GITHUB_TOKEN }}
+        github-token-release: ${{ secrets.ACTION_USER_TOKEN }}
 
   update-pr:
     runs-on: ubuntu-latest