fix: license display #357
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: Develop | |
on: | |
push: | |
branches: | |
- develop | |
jobs: | |
# Generates stub file | |
stubs: | |
name: Genrate stubs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '7.4' | |
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, soap, intl, gd, exif, iconv, imagick | |
coverage: none | |
- name: Install stub generator globally | |
run: composer global require php-stubs/generator --dev | |
- name: Install Composer dependencies | |
uses: "ramsey/composer-install@v2" | |
with: | |
composer-options: "--no-dev" | |
- name: Create stubs | |
run: composer generate-stubs | |
- name: Upload stubs as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: notification-stubs | |
path: compat/stubs.php | |
# Builds the package and creates artifact with dist files | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '7.4' | |
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, soap, intl, gd, exif, iconv, imagick | |
coverage: none | |
- name: Install Strauss globally | |
run: composer global require brianhenryie/strauss | |
- name: Install Composer dependencies | |
uses: "ramsey/composer-install@v2" | |
with: | |
composer-options: "--no-dev" | |
- name: Run Strauss | |
run: composer run-script prefix-namespaces-prod | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '16' | |
cache: yarn | |
- name: Install yarn dependencies | |
run: yarn install --immutable | |
- name: Build static assets | |
run: yarn build | |
- name: Create build dir | |
run: mkdir build | |
- name: Copy files | |
uses: Pendect/action-rsyncer@v1.1.0 | |
env: | |
DEPLOY_KEY: ${{ secrets.PACKAGES_DEPLOY_KEY }} | |
with: | |
flags: '-avq' | |
options: '--exclude-from=".build-excludes"' | |
src: '.' | |
dest: 'build' | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build | |
path: build | |
# Creates the dev package artifact from develop branch | |
pack: | |
name: Pack | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: build | |
path: ${{ secrets.SLUG }} | |
- name: Create archive | |
run: | | |
zip -rq ${{ secrets.SLUG }}-dev.zip ${{ secrets.SLUG }} | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ secrets.SLUG }}-dev | |
path: ${{ secrets.SLUG }}-dev.zip | |
# Uploads the develop package to internal repository | |
upload: | |
name: Upload to repo | |
runs-on: ubuntu-latest | |
needs: pack | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ secrets.SLUG }}-dev | |
path: . | |
- name: Upload to repo | |
uses: Pendect/action-rsyncer@v1.1.0 | |
env: | |
DEPLOY_KEY: ${{ secrets.PACKAGES_DEPLOY_KEY }} | |
with: | |
flags: '-avz' | |
options: '--recursive ' | |
src: '.' | |
dest: '${{ secrets.BRACKETSPACE_REPO_RSYNC_URL }}${{ secrets.SLUG }}/' |