Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
burhandodhy committed Jan 16, 2025
1 parent 251bc75 commit 35f7756
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 11 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build-and-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build and Tag
on:
push:
branches:
- 'master'

jobs:
wordpress:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set PHP version
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: :php-psr
coverage: none

- name: composer install
run: composer install

- name: install node v20
uses: actions/setup-node@v4
with:
node-version: 20

- name: Build
run: |
npm ci
npm run build
- name: Setup
run: 'echo "VERSION=$(grep -Po ''\"version\": \"[0-9\\.]+\"'' package.json | grep -Po ''[0-9\\.]+'')" >> $GITHUB_ENV'

- name: Tag
run: |
echo "Releasing version $VERSION ..."
git config user.name github-actions
git config user.email github-actions@github.com
git checkout -b "release-$VERSION"
git add -f dist/*
git commit --no-verify -m "Release $VERSION"
git tag "$VERSION"
git push --tags
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 3 additions & 2 deletions .github/workflows/push-asset-readme-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ jobs:
name: Push to master
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v4
- name: WordPress.org plugin asset/readme update
uses: 10up/action-wordpress-plugin-asset-update@master
uses: 10up/action-wordpress-plugin-asset-update@stable
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SLUG: brightcove-video-connect
25 changes: 17 additions & 8 deletions .github/workflows/push-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
name: Deploy to WordPress.org
name: Publish New Release

env:
SLUG: "brightcove-video-connect"

on:
push:
tags:
- "*"
release:
types: [published]

jobs:
tag:
name: New tag
name: New release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Checkout code
uses: actions/checkout@v4

- name: WordPress Plugin Deploy
uses: 10up/action-wordpress-plugin-deploy@master
if: "! github.event.release.prerelease"
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SLUG: ${{ env.SLUG }}
6 changes: 5 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ The `develop` branch is the development branch which means it contains the next
1. Commit your changes and open a PR to `develop`.
1. Once changes are merged, open a PR from `develop` to `master`.
1. Test: Once changes are merged, checkout the `master` branch locally and test for functionality.
1. Release: Once merged, draft a [new release](https://github.com/10up/brightcove-video-connect/releases/new) naming the release with the new version number, creating a new label `X.Y.Z`, and selecting as target `master`. Paste the release changelog from `CHANGELOG.md` into the body of the release and include a link to the closed issues on the [milestone](https://github.com/10up/brightcove-video-connect/#?closed=1).
1. [Check the _Build and Tag_ action](https://github.com/10up/brightcove-video-connect/actions/workflows/build-and-tag.yml): a new tag named with the version number should've been created. It should contain all the built assets.
1. Release: Create a [new release](https://github.com/10up/brightcove-video-connect/releases/new):
* **Tag**: The tag created in the previous step
* **Release title**: `Version X.Y.Z`
* **Description**: Release changelog from `CHANGELOG.md` + `See: https://github.com/10up/brightcove-video-connect/milestone/#?closed=1`
1. SVN: Wait for the [GitHub Action](https://github.com/10up/brightcove-video-connect/actions/workflows/push-deploy.yml) to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
1. Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/brightcove-video-connect/. This may take a few minutes.
1. Close milestone: Edit the [milestone](https://github.com/10up/brightcove-video-connect/milestone/#) with release date (in the `Due date (optional)` field) and link to GitHub release (in the `Description` field), then close the milestone.
Expand Down

0 comments on commit 35f7756

Please sign in to comment.