mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
Create nightly auto-builder
This commit is contained in:
parent
f4070215bc
commit
024fbea0e5
1 changed files with 36 additions and 0 deletions
36
.github/workflows/build.yml
vendored
Normal file
36
.github/workflows/build.yml
vendored
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
name: PHP Build and Archive
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: '8.1'
|
||||||
|
|
||||||
|
- name: Install Composer dependencies
|
||||||
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
|
- name: Create archive
|
||||||
|
run: |
|
||||||
|
timestamp=$(date +%Y%m%d%H%M%S)
|
||||||
|
zip_name="build-$timestamp.zip"
|
||||||
|
zip -r "$zip_name" . -x "*/.git/*" "*/.github/*" "*/.gitignore/*"
|
||||||
|
echo "::set-output name=zip_name::$zip_name"
|
||||||
|
id: create_zip
|
||||||
|
|
||||||
|
- name: Upload Archive
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: build-archive
|
||||||
|
path: ${{ steps.create_zip.outputs.zip_name }}
|
Loading…
Add table
Add a link
Reference in a new issue