1.16.1 #23
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow | |
name: Deploy Tag | |
on: | |
release: | |
types: [published] | |
env: | |
ENVIRONMENT_URL: https://wordpress.org/plugins/wp-crontrol | |
jobs: | |
wordpress: | |
name: WordPress.org | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
deployments: write | |
timeout-minutes: 10 | |
steps: | |
- uses: octokit/[email protected] | |
name: Create GitHub deployment | |
id: deployment | |
with: | |
route: POST /repos/:repository/deployments | |
repository: ${{ github.repository }} | |
ref: ${{ github.ref }} | |
required_contexts: "[]" | |
environment: WordPress.org | |
description: "Deploy version ${{ github.event.release.tag_name }} to the plugin directory" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: octokit/[email protected] | |
name: Set GitHub deployment status | |
with: | |
route: POST /repos/:repository/deployments/:deployment_id/statuses | |
repository: ${{ github.repository }} | |
deployment_id: ${{ fromJson( steps.deployment.outputs.data ).id }} | |
state: pending | |
environment_url: ${{ env.ENVIRONMENT_URL }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Debugging | |
run: | | |
npm --version | |
- name: Install Dependencies | |
run: npm install | |
- name: Populate Changelog | |
run: | | |
node .github/workflows/changelog.js readme.md | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add readme.md | |
git commit -m "Readme" | |
env: | |
TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: WordPress Plugin Deploy | |
uses: 10up/[email protected] | |
env: | |
SVN_USERNAME: ${{ secrets.WPORG_SVN_USERNAME }} | |
SVN_PASSWORD: ${{ secrets.WPORG_SVN_PASSWORD }} | |
- name: Deployment Succeeded | |
if: success() | |
uses: octokit/[email protected] | |
with: | |
route: POST /repos/:repository/deployments/:deployment_id/statuses | |
repository: ${{ github.repository }} | |
state: success | |
deployment_id: ${{ fromJson( steps.deployment.outputs.data ).id }} | |
environment_url: ${{ env.ENVIRONMENT_URL }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Deployment Failed | |
if: failure() | |
uses: octokit/[email protected] | |
with: | |
route: POST /repos/:repository/deployments/:deployment_id/statuses | |
repository: ${{ github.repository }} | |
state: failure | |
deployment_id: ${{ fromJson( steps.deployment.outputs.data ).id }} | |
environment_url: ${{ env.ENVIRONMENT_URL }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
github: | |
name: GitHub Milestones | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
issues: write | |
timeout-minutes: 10 | |
steps: | |
- name: Get next versions | |
id: semvers | |
uses: WyriHaximus/[email protected] | |
with: | |
version: ${{ github.event.release.tag_name }} | |
- name: Create next patch milestone | |
uses: octokit/[email protected] | |
with: | |
route: POST /repos/:repository/milestones | |
repository: ${{ github.repository }} | |
title: ${{ steps.semvers.outputs.patch }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
continue-on-error: true | |
- name: Create next minor milestone | |
uses: octokit/[email protected] | |
with: | |
route: POST /repos/:repository/milestones | |
repository: ${{ github.repository }} | |
title: ${{ steps.semvers.outputs.minor }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
continue-on-error: true | |
- name: Create next major milestone | |
uses: octokit/[email protected] | |
with: | |
route: POST /repos/:repository/milestones | |
repository: ${{ github.repository }} | |
title: ${{ steps.semvers.outputs.major }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
continue-on-error: true |