Skip to content

Commit

Permalink
Merge pull request #277 from ashleyfae/release/1.3
Browse files Browse the repository at this point in the history
Release/1.3
  • Loading branch information
ashleyfae committed Apr 18, 2022
2 parents 48170d5 + c2295ce commit d6bdf34
Show file tree
Hide file tree
Showing 250 changed files with 11,876 additions and 8,967 deletions.
18 changes: 18 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
* text=auto
.github/ export-ignore
.gitignore export-ignore
.gitattributes export-ignore

.phpstorm.meta.php export-ignore

tests/ export-ignore
phpunit.xml export-ignore

composer.json export-ignore
composer.lock export-ignore

mix-manifest.json export-ignore
package.json export-ignore
package-lock.json export-ignore
webpack.mix.js export-ignore
webpack.config.js export-ignore
63 changes: 63 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# @link https://leoloso.com/posts/github-action-to-release-wp-plugin/
# Creates a zip file containing the installable plugin.
# Steps:
# - Checkout the source code.
# - Run "composer install" to download all dependencies.
# - Use `git archive` to create a zip file.
# - Manually add the `vendor/` directory to that zip file. (Little gross.)
# - Upload the .zip file as an artifact to the action.
# - Upload the .zip file to the release, for download.

name: Generate Installable Plugin, and Upload as Release Asset

# Controls wh en the workflow will run.
on:
# Triggers when a new release is published.
release:
types: [published]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel.
jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job.
steps:
# Checks out the source code.
- name: Checkout code
uses: actions/checkout@v2

# Runs "composer install" and creates the build directory.
- name: Build project
run: |
composer install --no-dev --optimize-autoloader
mkdir build
mkdir ${{ github.event.repository.name }}
mv vendor/ ${{ github.event.repository.name }}/
# Create the zip file. Note that this won't include vendor/, we have to add that next.
- name: Create artifact
run: |
git archive --prefix ${{ github.event.repository.name }}/ -o build/${{ github.event.repository.name }}-${{ github.event.release.name }}.zip HEAD
# Manually add the vendor/ directory into the zip file.
- name: Add vendor files
uses: montudor/action-zip@v0.1.0
with:
args: zip -ur build/${{ github.event.repository.name }}-${{ github.event.release.name }}.zip ${{ github.event.repository.name }}/

# Uploads the zip file to the action.
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: ${{ github.event.repository.name }}-${{ github.event.release.name }}
path: build/${{ github.event.repository.name }}-${{ github.event.release.name }}.zip

# Attaches the zip file to the release.
- name: Upload to release
uses: JasonEtco/upload-to-release@master
with:
args: build/${{ github.event.repository.name }}-${{ github.event.release.name }}.zip application/zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ npm-debug.log
*.sass.map
*.scss.map
/node_modules/
/vendor/

# amcharts spam
assets/js/build/vendors~canvg.min.js
Expand Down
11 changes: 11 additions & 0 deletions .phpstorm.meta.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php
namespace PHPSTORM_META {
// Allow PhpStorm IDE to resolve return types when calling book_database( Object_Type::class ) or book_database( `Object_Type` ).
override(
\Book_Database\book_database( 0 ),
map( [
'' => '@',
'' => '@Class',
] )
);
}
5 changes: 5 additions & 0 deletions assets/js/build/alpine.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit d6bdf34

Please sign in to comment.