diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 67fca0a..8df790f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,13 +14,19 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 + - name: Get latest successful run ID + id: get-run + run: | + LATEST_RUN=$(curl -s -H "Authorization: token ${FORGEJO_TOKEN}" \ + "https://git.askar.tv/api/v1/repos/owner/repo/actions/runs?status=success&event=push&branch=main" | \ + jq -r '.[] | select(.workflow_id=="main.yml") | .id' | head -n1) + echo "run_id=$LATEST_RUN" >> "$GITHUB_OUTPUT" + - name: Download Signed AAB uses: actions/download-artifact@v3 with: - workflow: .github/workflows/main.yml - list: true - workflow_conclusion: success name: signed-aab + run-id: ${{ steps.get-run.outputs.run_id }} path: ./release