1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 07:02:34 +01:00
invoiceninja/.github/workflows/release.yml

66 lines
1.7 KiB
YAML
Raw Normal View History

on:
release:
types: [released]
name: Upload Release Asset
2020-12-19 22:12:39 +01:00
jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
2020-12-19 22:00:02 +01:00
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: mysql, mysqlnd, sqlite3, bcmath, gd, curl, zip, openssl, mbstring, xml
- name: Checkout code
uses: actions/checkout@v1
with:
2020-10-15 11:45:41 +02:00
ref: v5-stable
- name: Copy .env file
run: |
cp .env.example .env
- name: Install composer dependencies
run: |
composer config -g github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
composer install --no-dev
- name: Prepare Laravel Application
run: |
cp .env.example .env
php artisan key:generate
php artisan optimize
php artisan storage:link
sudo php artisan cache:clear
2021-01-19 05:14:45 +01:00
sudo find ./vendor/bin/ -type f -exec chmod +x {} \;
sudo find ./ -type d -exec chmod 755 {} \;
- name: Prepare JS/CSS assets
run: |
npm i
npm run production
- name: Cleanup Builds
run: |
sudo rm -rf bootstrap/cache/*
2021-01-14 10:31:27 +01:00
sudo rm -rf node_modules
2021-04-20 23:41:50 +02:00
sudo rm -rf .git
2021-10-28 02:21:04 +02:00
sudo rm .env
2021-06-18 15:15:20 +02:00
- name: Build project
run: |
zip -r ./invoiceninja.zip .* -x "../*"
2021-06-18 15:01:32 +02:00
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
2021-06-18 15:06:39 +02:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
2021-06-18 15:01:32 +02:00
files: |
2021-10-28 02:21:04 +02:00
invoiceninja.zip