Skip to content

WordPress 6.6

WordPress 6.6 #97

Workflow file for this run

on:
push:
branches:
- main
- master
- 'release/**'
pull_request:
branches:
- main
- master
- 'release/**'
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Set env
run: echo "VERSION=${GITHUB_REF/refs\/heads\/release\//}.$GITHUB_RUN_NUMBER" >> $GITHUB_ENV
- uses: actions/checkout@v2
- name: Set up environment
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: mbstring, xml, ctype, iconv, intl
coverage: xdebug
- name: Install Composer dependencies
run: ./composer.phar install --prefer-dist --optimize-autoloader
- name: Run Lint
run: ./vendor/bin/phpcs -i && ./vendor/bin/phpcs -s .
- name: Clean workspace
run: ./composer.phar install --prefer-dist --optimize-autoloader --no-dev
- name: Set package versioning
if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' && github.event_name == 'push'
run: |
sed -i "s/{{VERSION}}/${VERSION}/g" Authress_Sso_Login.php
sed -i "s/{{VERSION}}/${VERSION}/g" wordpress/readme.txt
cp wordpress/readme.txt readme.txt
- name: WordPress.org plugin deployment
id: wordpress_deploy
if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' && github.event_name == 'push'
uses: 10up/action-wordpress-plugin-deploy@2a5e2c14244768a9e9b2396ca8e70e739061c9ec
env:
SVN_PASSWORD: ${{ secrets.WORDPRESS_SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.WORDPRESS_SVN_USERNAME }}
SLUG: authress
ASSETS_DIR: wordpress
README_NAME: wordpress/readme.txt
with:
generate-zip: true
- name: Create Release
if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' && github.event_name == 'push'
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
release_name: Release ${{ env.VERSION }}
draft: false
prerelease: false
- name: Upload Release Asset
if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' && github.event_name == 'push'
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ${{ steps.wordpress_deploy.outputs.zip-path }}
asset_name: authress.zip
asset_content_type: application/zip