diff --git a/.github/workflows/build-all.yml b/.github/workflows/build-all.yml index 648f484f..4a3cd0e2 100644 --- a/.github/workflows/build-all.yml +++ b/.github/workflows/build-all.yml @@ -21,8 +21,18 @@ on: type: boolean required: false default: false - publish: - description: Publish release + release: + description: Publish GitHub release + type: boolean + required: false + default: false + nuget: + description: Publish on nuget.org + type: boolean + required: false + default: false + anaconda: + description: Publish on anaconda.org type: boolean required: false default: false @@ -559,7 +569,7 @@ jobs: name: NuGet packages path: '*.nupkg' - name: Push to nuget.org - if: env.NUGET_API_KEY && startsWith(github.event.inputs.branch, 'chromium/') && github.event.inputs.version && github.event.inputs.publish == 'true' + if: env.NUGET_API_KEY && startsWith(github.event.inputs.branch, 'chromium/') && github.event.inputs.version && github.event.inputs.nuget == 'true' run: nuget push -Source nuget.org -ApiKey ${{ secrets.NUGET_API_KEY }} *.nupkg env: NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} @@ -629,7 +639,7 @@ jobs: run: conda install -yq anaconda-client shell: bash -l {0} - name: Upload to Anaconda - if: env.ANACONDA_API_TOKEN && startsWith(github.event.inputs.branch, 'chromium/') && github.event.inputs.version && github.event.inputs.publish == 'true' + if: env.ANACONDA_API_TOKEN && startsWith(github.event.inputs.branch, 'chromium/') && github.event.inputs.version && github.event.inputs.anaconda == 'true' run: find conda/out -name 'pdfium-binaries-*.tar.bz2' -exec anaconda upload --force {} + shell: bash -l {0} env: @@ -637,7 +647,7 @@ jobs: publish: name: Publish Release - if: startsWith(github.event.inputs.branch, 'chromium/') && github.event.inputs.version && github.event.inputs.publish == 'true' + if: startsWith(github.event.inputs.branch, 'chromium/') && github.event.inputs.version && github.event.inputs.release == 'true' runs-on: ubuntu-latest needs: - android_arm diff --git a/.github/workflows/trigger.yml b/.github/workflows/trigger.yml index 9b4633d0..e04597ca 100644 --- a/.github/workflows/trigger.yml +++ b/.github/workflows/trigger.yml @@ -19,6 +19,10 @@ jobs: BUILD=$(echo "$VERSION" | cut -d. -f3) echo "version=$VERSION" >> $GITHUB_OUTPUT echo "branch=chromium/$BUILD" >> $GITHUB_OUTPUT + - name: Get date + id: date + run: | + echo "day=$(date +%-d)" >> $GITHUB_OUTPUT - name: Trigger build uses: benc-uk/workflow-dispatch@v1 with: @@ -30,5 +34,7 @@ jobs: "version": "${{ steps.chromium.outputs.version }}", "is_debug": "false", "enable_v8": "true", - "publish": "true" + "release": "true", + "nuget": "true", + "anaconda": "${{ steps.date.outputs.day <= 7 && 'true' || 'false' }}", }