Releasing v1.1.7 #16
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
name: Deploy to WordPress.org Repository | |
on: | |
release: | |
types: [released] | |
jobs: | |
deploy_to_wp_repository: | |
name: Deploy to WP.org | |
runs-on: ubuntu-latest | |
env: | |
PLUGIN_SLUG: bit-smtp | |
DRY_RUN: false | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install frontend dependencies | |
run: pnpm install | |
- name: Setup PHP | |
id: setup-php | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '7.x' | |
tools: composer:v2, wp-cli | |
- name: Get Composer cache directory | |
id: composer-cache | |
shell: bash | |
run: | | |
echo "COMPOSER_CACHE_PATH=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
name: Setup composer cache | |
with: | |
path: ${{ steps.composer-cache.outputs.COMPOSER_CACHE_PATH }} | |
key: ${{ runner.os }}-composer-cache-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer-cache- | |
- name: Install php dependencies | |
run: composer i --no-dev --optimize-autoloader | |
- name: Build | |
id: build-plugin | |
run: | | |
pnpm build | |
pnpm i18n:parse-js | |
pnpm i18n:php | |
- name: WordPress Plugin Deploy | |
id: deploy | |
uses: 10up/action-wordpress-plugin-deploy@stable | |
with: | |
generate-zip: true | |
dry-run: ${{ env.DRY_RUN }} | |
env: | |
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | |
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | |
SLUG: ${{ env.PLUGIN_SLUG }} | |
- name: Upload release asset | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: ${{ steps.deploy.outputs['zip-path'] }} |