mirror of
https://github.com/torrentpier/torrentpier.git
synced 2025-03-12 04:35:42 -07:00
42 lines
1.0 KiB
YAML
42 lines
1.0 KiB
YAML
name: TorrentPier nightly builder
|
|
|
|
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: Get commit hash
|
|
id: get_commit_hash
|
|
run: |
|
|
COMMIT_HASH=$(git rev-parse --short HEAD)
|
|
echo "COMMIT_HASH=$COMMIT_HASH" >> $GITHUB_OUTPUT
|
|
|
|
- name: Create archive
|
|
id: create_zip
|
|
run: |
|
|
ZIP_NAME="torrentpier-${{ steps.get_commit_hash.outputs.COMMIT_HASH }}.zip"
|
|
zip -r "$ZIP_NAME" . -x ".git/*" ".github/*"
|
|
echo "ZIP_NAME=$ZIP_NAME" >> $GITHUB_OUTPUT
|
|
|
|
- name: Upload Archive
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: TorrentPier
|
|
path: ${{ steps.create_zip.outputs.ZIP_NAME }}
|