-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve(deploy): Improve how deployments work #262
- Loading branch information
Showing
9 changed files
with
137 additions
and
82 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
on: | ||
release: | ||
types: [published] | ||
|
||
name: Deploy Release Assets | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get Version From Tag | ||
id: get_version | ||
uses: actions-ecosystem/[email protected] | ||
with: | ||
semver_only: true | ||
|
||
- name: Latest Version | ||
id: latest_version | ||
run: | | ||
TAG=${{ steps.get_version.outputs.tag }} | ||
echo ::set-output name=VERSION::${TAG#v} | ||
- name: Cache Composer dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: /tmp/composer-cache | ||
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} | ||
|
||
- name: Composer Install | ||
uses: php-actions/composer@v6 | ||
with: | ||
working_dir: ./ | ||
dev: no | ||
php_version: 7.4 | ||
|
||
- name: Install Yarn Dependencies | ||
run: | | ||
yarn install | ||
yarn build | ||
rm -rf node_modules | ||
- name: Build Plugin UI | ||
run: | | ||
cd ./frontend | ||
yarn install | ||
yarn build | ||
- name: Clean Build Files/Folders | ||
run : | | ||
chmod +x ./.deployment/cleanup.sh | ||
sh ./.deployment/cleanup.sh; | ||
- name: Create Sync Zip | ||
run: | | ||
cd ./zip | ||
zip -r ../courier-notices.zip ./ | ||
cd ../ | ||
- name: Upload files to a GitHub release | ||
uses: svenstaro/[email protected] | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: courier-notices.zip | ||
tag: ${{ steps.get_version.outputs.tag }} | ||
name: courier-notices.zip | ||
overwrite: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
name: release-please | ||
jobs: | ||
release-please: | ||
if: github.event_name != 'pull_request' && github.event.pull_request.merged != true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: google-github-actions/release-please-action@v3 | ||
with: | ||
release-type: php | ||
package-name: mantle | ||
bump-minor-pre-major: true | ||
token: ${{ secrets.GH_BOT_TOKEN }} | ||
versioning-strategy: always-bump-patch | ||
extra-files: | | ||
README.md | ||
package.json | ||
courier-notices.php | ||
readme.txt | ||
composer.json |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- 'v*' | ||
paths: | ||
- .github/workflows/wiki.yml | ||
- '**.php' | ||
|
||
name: Update Wiki | ||
|
||
jobs: | ||
update_wiki: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Create Wiki Markdown | ||
uses: php-actions/composer@v6 | ||
|
||
- name: Generate API docs | ||
run: | | ||
wget https://phpdoc.org/phpDocumentor.phar | ||
php phpDocumentor.phar --directory=./application --target=./wiki --template='vendor/saggre/phpdocumentor-markdown/themes/markdown' | ||
- name: Push Wiki Changes | ||
uses: Andrew-Chen-Wang/github-wiki-action@v3 | ||
env: | ||
# Make sure you have that / at the end. We use rsync | ||
# WIKI_DIR's default is wiki/ | ||
WIKI_DIR: wiki/ | ||
GH_TOKEN: ${{ secrets.GH_WIKI_UPDATE_TOKEN }} | ||
GH_MAIL: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | ||
GH_NAME: ${{ github.repository_owner }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ extensions: | |
- php | ||
exclude: | ||
- vendor | ||
warning: true | ||
- github/workspace/vendor/ | ||
warning: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
nodeLinker: node-modules | ||
pnpFallbackMode: none |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Elite Product |