|
| 1 | +name: "Post Publish" |
| 2 | +run-name: "${{ inputs.tag || github.ref_name }}: Post Publish${{ github.event_name == 'workflow_dispatch' && inputs.dry-run && ' (dry run)' || '' }}" |
| 3 | + |
| 4 | +# What is done after a release was made public and its tag is pushed (the tag is the release |
| 5 | +# version, 7.1.3): its issues are copied to the OSS repository, the tag is merged forward into the |
| 6 | +# newer branches, and the branches that were built for the testing and the staging are deleted. |
| 7 | +# It runs when a tag of a version is pushed (for real), and by hand with the tag as an input (a dry |
| 8 | +# run unless it is unticked). What it does, and the secret that it needs, are in the guide of the |
| 9 | +# reusable workflow that does it: |
| 10 | +# |
| 11 | +# https://github.com/spring-io/spring-security-actions/blob/0.0.32/docs/post-publish.md |
| 12 | +# |
| 13 | +# The reusable workflow and its actions are in the repository spring-io/spring-security-actions, |
| 14 | +# and are called at the commit of a tag. |
| 15 | +# |
| 16 | +# This file is the same in the OSS repository and in the commercial one: the work is always done |
| 17 | +# in the commercial repository, which is the OSS one with -commercial, whichever of the two the tag |
| 18 | +# is pushed to. Both repositories need the secret RELEASE_AUTOMATION_TOKEN. The caller has to be in |
| 19 | +# the history of the tagged commit, as a tag runs the file of the commit that it points to. |
| 20 | + |
| 21 | +"on": |
| 22 | + push: |
| 23 | + tags: |
| 24 | + - "[0-9]*.[0-9]*.[0-9]*" |
| 25 | + workflow_dispatch: |
| 26 | + inputs: |
| 27 | + tag: |
| 28 | + description: "The tag, which is the version of the release, for example 7.1.3" |
| 29 | + required: true |
| 30 | + type: string |
| 31 | + ref: |
| 32 | + description: "Dry run only, before the tag exists: a branch or a commit of the commercial repository that stands in for the tag, for example release/7.1.3" |
| 33 | + required: false |
| 34 | + type: string |
| 35 | + dry-run: |
| 36 | + description: "Only say what would be done: nothing is copied, pushed or deleted" |
| 37 | + default: true |
| 38 | + type: boolean |
| 39 | + |
| 40 | +# The reusable workflow has jobs that need more than read access (deploy-docs dispatches a workflow, |
| 41 | +# publish-release-notes creates the GitHub release), and a called workflow cannot be given more |
| 42 | +# than its caller has: with less, the run fails at startup. |
| 43 | +permissions: |
| 44 | + actions: write |
| 45 | + contents: write |
| 46 | + issues: read |
| 47 | + pull-requests: read |
| 48 | + |
| 49 | +jobs: |
| 50 | + post-publish: |
| 51 | + name: Post publish |
| 52 | + uses: spring-io/spring-security-actions/.github/workflows/post-publish.yml@fb60de7ce6004db5cf697c61f69ab33e61673a47 # 0.0.33 |
| 53 | + with: |
| 54 | + tag: ${{ inputs.tag || github.ref_name }} |
| 55 | + ref: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || '' }} |
| 56 | + dry-run: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run }} |
| 57 | + runs-on: ${{ vars.UBUNTU_RUNS_ON }} |
| 58 | + secrets: |
| 59 | + RELEASE_AUTOMATION_TOKEN: ${{ secrets.RELEASE_AUTOMATION_TOKEN }} |
| 60 | + GH_WEBSITE_COMMERCIAL_CONTENT_TOKEN: ${{ secrets.GH_WEBSITE_COMMERCIAL_CONTENT_TOKEN }} |
| 61 | + GH_ACTIONS_REPO_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} |
0 commit comments