Skip to content

Commit d45fd4d

Browse files
committed
Simplify the deployment config.
1 parent 12a7f9d commit d45fd4d

File tree

1 file changed

+4
-49
lines changed

1 file changed

+4
-49
lines changed

.github/workflows/deploy-tag.yml

Lines changed: 4 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -5,38 +5,17 @@ on:
55
release:
66
types: [published]
77

8-
env:
9-
ENVIRONMENT_URL: https://wordpress.org/plugins/query-monitor
8+
concurrency: WordPress.org
109

1110
jobs:
1211
wordpress:
1312
name: WordPress.org
1413
runs-on: ubuntu-latest
1514
timeout-minutes: 10
15+
environment:
16+
name: WordPress.org
17+
url: https://wordpress.org/plugins/query-monitor
1618
steps:
17-
- uses: octokit/[email protected]
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-
- uses: octokit/[email protected]
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 }}
4019

4120
- name: Checkout repository
4221
uses: actions/checkout@v2
@@ -61,30 +40,6 @@ jobs:
6140
SVN_USERNAME: ${{ secrets.WPORG_SVN_USERNAME }}
6241
SVN_PASSWORD: ${{ secrets.WPORG_SVN_PASSWORD }}
6342

64-
- name: Deployment Succeeded
65-
if: success()
66-
uses: octokit/[email protected]
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-
uses: octokit/[email protected]
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-
8843
github:
8944
name: GitHub Milestones
9045
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)