Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staging #59

Merged
merged 8 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/build-production-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build Production & Release

on:
release:
types:
- created

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'

- name: Setup composer
run: composer setup

- name: Setup Node.js 18.15.0
uses: actions/setup-node@v2
with:
node-version: "18.15.0"

- name: Install yarn globally
run: npm install --global yarn

- name: Install yarn dependencies
run: yarn install

- name: Compile Scripts
run: yarn minify

- name: Fix Text Domain
run: yarn fixtextdomain

- name: Generate Text Domain POT file
run: composer make-production-pot

- name: Remove Composer Dev Dependencies
run: composer build

- name: Build plugin
run: yarn git-compress

- name: Create zip file
run: |
tag_name=$(git describe --tags --abbrev=0)
zip -r "templatiq.${tag_name}.zip" templatiq

- name: Upload zip file as a release asset
uses: softprops/action-gh-release@v1
with:
files: templatiq*.zip
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
10 changes: 4 additions & 6 deletions .github/workflows/deploy-to-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up PHP
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'

- name: Setup composer
- name: Setup Composer
run: composer setup

- name: Setup Node.js 18.15.0
Expand All @@ -38,20 +38,18 @@ jobs:
- name: Fix Text Domain
run: yarn fixtextdomain

- name: Generate Text Domain POT file
run: composer make-unminified-pot

- name: Remove Composer Dev Dependencies
run: composer build

- name: 📂 Sync files
- name: 📂 Sync Files - FTP Deploy
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.ftp_staging_server }}
username: ${{ secrets.ftp_staging_username }}
password: ${{ secrets.ftp_staging_password }}
port: 21
exclude: |
src/**
node_modules/**
resources/js/**
resources/svg/**
Expand Down
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@
},
"scripts": {
"build": [
"composer -d vendor --no-plugins --no-interaction install --no-scripts --no-dev"
"composer -d . --no-plugins --no-interaction install --no-scripts --no-dev"
],
"format": "vendor/bin/phpcbf --standard=phpcs.xml",
"phpcs": "vendor/bin/phpcs --standard=phpcs.xml"
"phpcs": "vendor/bin/phpcs --standard=phpcs.xml",
"setup": [
"composer install --no-cache"
]
},
"config": {
"allow-plugins": {
Expand Down
File renamed without changes.
File renamed without changes.
Loading