Files
FOSSBilling/.github/workflows/artifact.yml
T
31102836b3 Bump actions/checkout from 2 to 3 (#101)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jaap Marcus <9754650+jaapmarcus@users.noreply.github.com>
Co-authored-by: Benjamin Aerni <aernibenjamin@gmail.com>
2022-05-29 20:12:09 -07:00

80 lines
2.2 KiB
YAML

name: Create a downloadable preview build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ["8.0"]
name: Create a downloadable preview build
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: "16"
- name: Check PHP Version
run: php -v
- name: Validate composer.json and composer.lock
run: composer validate
working-directory: ./src
- name: Installing NPM dependencies
run: npm install
- name: Create temporary directories and files
run: |
mkdir -p ./src/bb-data/{cache,log,uploads}
touch ./src/bb-data/{cache,log,uploads}/index.html
mkdir -p ./build/{code-browser,code-coverage,logs,pdepend,update,distribution,source}
- name: Copy mandatory files to the temporary build folder
run: |
cp -r ./src/* ./build/source/
cp README.md ./build/source/
cp LICENSE ./build/source/
cp CHANGELOG.md ./build/source/
- name: Building assets
run: gulp build
working-directory: ./build/source
- name: Installing Composer dependencies
run: composer install --prefer-dist --no-progress --no-suggest --no-dev --optimize-autoloader
working-directory: ./build/source
- name: Add short commit hash as the release number
run: |
sed s/0.0.1/${GITHUB_SHA::7}/ Version.php > Version2.php
mv Version2.php Version.php
working-directory: ./build/source/bb-library/Box
- name: Create the final archive
run: tar cvf ./build/distribution/FOSSBilling-${GITHUB_SHA::7}.tar -C ./build/source .
- name: Upload the final artifact
uses: actions/upload-artifact@v3
with:
name: FOSSBilling Preview Archive
path: ./build/distribution/
if-no-files-found: error