Skip to content

Merge pull request #1 from AlexanderGW/v0.0.7 #2

Merge pull request #1 from AlexanderGW/v0.0.7

Merge pull request #1 from AlexanderGW/v0.0.7 #2

name: Create WPSEO.AI Release
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install PNPM
uses: pnpm/action-setup@v3
with:
version: 7
run_install: false
- name: Get PNPM store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup PNPM cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build dependencies
run: pnpm build
- name: Create plugin directory
run: mkdir ai-seo-wp
- name: Add dist and archive assets to plugin directory
run: cp -R dist ./ai-seo-wp/ && cp -R ./archive-output/*/* ./ai-seo-wp/
- name: Zip plugin directory
run: zip -r ai-seo-wp.zip ./ai-seo-wp
# - name: Package Repository
# run: zip -r ai-seo-wp.zip ./* -x "*.git* -x "*.node_modules*"
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
body: "Version `${{ github.ref }}`, for more details: https://wpseo.ai/get-wordpress-plugin.html"
files: ai-seo-wp.zip