Directadmin plugin enhancements (#434) #316
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: Beta Build | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Code checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e | |
with: | |
php-version: '8.2' | |
- name: Install dependencies | |
run: | | |
composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
npm i | |
- name: Build | |
run: npm run build | |
- name: remove vendor and node_modules | |
run: | | |
rm -rf vendor | |
rm -rf node_modules | |
- id: get_latest_release | |
uses: pozetroninc/github-action-get-latest-release@master | |
with: | |
owner: Paymenter | |
repo: Paymenter | |
excludes: prerelease, draft | |
- name: Create release branch and bump version | |
run: sed -i "s/ 'version' => 'development',/ 'version' => 'beta',/" config/app.php | |
- name: Add commit sha to app.php | |
run: sed -i "s/ 'commit' => '',/ 'commit' => '${{ github.sha }}',/" config/app.php | |
- name: Create release archive | |
run: | | |
rm -rf node_modules tests CODE_OF_CONDUCT.md CONTRIBUTING.md flake.lock flake.nix phpstan.neon phpunit.xml shell.nix | |
tar -czf paymenter.tar.gz * .env.example .gitignore | |
- name: Create checksum and add to changelog | |
run: | | |
SUM=`sha256sum paymenter.tar.gz` | |
echo $SUM > checksum.txt | |
- name: Upload archive to https://api.paymenter.org/beta | |
uses: JantHsueh/upload-file-action@master | |
with: | |
url: https://api.paymenter.org/beta | |
forms: '{"api_key": "${{ secrets.API_KEY }}"}' | |
fileForms: '{"checksum": "checksum.txt","file": "paymenter.tar.gz"}' |