|
5 | 5 | release: |
6 | 6 | types: [published] |
7 | 7 |
|
8 | | -env: |
9 | | - ENVIRONMENT_URL: https://wordpress.org/plugins/query-monitor |
| 8 | +concurrency: WordPress.org |
10 | 9 |
|
11 | 10 | jobs: |
12 | 11 | wordpress: |
13 | 12 | name: WordPress.org |
14 | 13 | runs-on: ubuntu-latest |
15 | 14 | timeout-minutes: 10 |
| 15 | + environment: |
| 16 | + name: WordPress.org |
| 17 | + url: https://wordpress.org/plugins/query-monitor |
16 | 18 | steps: |
17 | | - |
18 | | - name: Create GitHub deployment |
19 | | - id: deployment |
20 | | - with: |
21 | | - route: POST /repos/:repository/deployments |
22 | | - repository: ${{ github.repository }} |
23 | | - ref: ${{ github.ref }} |
24 | | - required_contexts: "[]" |
25 | | - environment: WordPress.org |
26 | | - description: "Deploy version ${{ github.event.release.tag_name }} to the plugin directory" |
27 | | - env: |
28 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
29 | | - |
30 | | - |
31 | | - name: Set GitHub deployment status |
32 | | - with: |
33 | | - route: POST /repos/:repository/deployments/:deployment_id/statuses |
34 | | - repository: ${{ github.repository }} |
35 | | - deployment_id: ${{ fromJson( steps.deployment.outputs.data ).id }} |
36 | | - state: pending |
37 | | - environment_url: ${{ env.ENVIRONMENT_URL }} |
38 | | - env: |
39 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
40 | 19 |
|
41 | 20 | - name: Checkout repository |
42 | 21 | uses: actions/checkout@v2 |
|
61 | 40 | SVN_USERNAME: ${{ secrets.WPORG_SVN_USERNAME }} |
62 | 41 | SVN_PASSWORD: ${{ secrets.WPORG_SVN_PASSWORD }} |
63 | 42 |
|
64 | | - - name: Deployment Succeeded |
65 | | - if: success() |
66 | | - |
67 | | - with: |
68 | | - route: POST /repos/:repository/deployments/:deployment_id/statuses |
69 | | - repository: ${{ github.repository }} |
70 | | - state: success |
71 | | - deployment_id: ${{ fromJson( steps.deployment.outputs.data ).id }} |
72 | | - environment_url: ${{ env.ENVIRONMENT_URL }} |
73 | | - env: |
74 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
75 | | - |
76 | | - - name: Deployment Failed |
77 | | - if: failure() |
78 | | - |
79 | | - with: |
80 | | - route: POST /repos/:repository/deployments/:deployment_id/statuses |
81 | | - repository: ${{ github.repository }} |
82 | | - state: failure |
83 | | - deployment_id: ${{ fromJson( steps.deployment.outputs.data ).id }} |
84 | | - environment_url: ${{ env.ENVIRONMENT_URL }} |
85 | | - env: |
86 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
87 | | - |
88 | 43 | github: |
89 | 44 | name: GitHub Milestones |
90 | 45 | runs-on: ubuntu-latest |
|
0 commit comments