diff --git a/.github/workflows/weekly-release.yml b/.github/workflows/weekly-release.yml new file mode 100644 index 0000000..c31cb22 --- /dev/null +++ b/.github/workflows/weekly-release.yml @@ -0,0 +1,43 @@ +# Releases this plugin from its dev branch when plugin.json carries an untagged version whose +# CHANGELOG.md entry is undated. It has no schedule yet, so it only runs when dispatched by hand. +# The logic lives in matomo-org/plugin-ci-workflows; see the "Weekly release" section of its +# README.md. + +name: Weekly release + +on: + workflow_dispatch: + inputs: + all-branches: + description: "Also release the other maintained branches" + type: boolean + default: false + skip-ci-check: + description: "Release this branch even though its CI failed or is still running" + type: boolean + default: false + +permissions: {} + +jobs: + release: + # Granted here because permissions can only be reduced down a call chain, never elevated. + permissions: + actions: write + contents: write + pull-requests: write + uses: matomo-org/plugin-ci-workflows/.github/workflows/plugin-dev-release.yml@main + with: + skip-ci-check: ${{ inputs.skip-ci-check || false }} + secrets: + approver-token: ${{ secrets.TESTS_ACCESS_TOKEN }} + + # A dispatched run must not dispatch again, or the branches would keep dispatching each other. + other-branches: + if: github.event_name == 'schedule' || inputs.all-branches + permissions: + actions: write + contents: read + uses: matomo-org/plugin-ci-workflows/.github/workflows/plugin-branch-sweep.yml@main + with: + workflow-file: weekly-release.yml