Skip to content

Merge pull request #28 from linchpin/release-please--branches--trunk-… #37

Merge pull request #28 from linchpin/release-please--branches--trunk-…

Merge pull request #28 from linchpin/release-please--branches--trunk-… #37

on:
push:
branches:
- trunk
permissions:
contents: write
pull-requests: write
name: release-please
jobs:
release-please:
if: github.event_name != 'pull_request' && github.event.pull_request.merged != true
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
release-type: php
package-name: ash
bump-minor-pre-major: true
token: ${{ secrets.GH_BOT_TOKEN }}
versioning-strategy: always-bump-patch
build:
needs: release-please
runs-on: ubuntu-latest
if: ${{ needs.release-please.outputs.release_created }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Get Version From Tag
id: get_version
uses: actions-ecosystem/[email protected]
with:
semver_only: true
- name: Latest Version
id: latest_version
run: |
TAG=${{ steps.get_version.outputs.tag }}
echo ::set-output name=VERSION::${TAG#v}
- name: Cache Composer dependencies
uses: actions/cache@v3
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- name: Composer Install
uses: php-actions/composer@v6
with:
working_dir: ./
dev: no
php_version: 7.4
- name: Build Base Assets
run: |
npm install && npm run build
rm -rf node_modules
- name: Clean Build Files/Folders
run: |
chmod +x ./.deployment/cleanup.sh
sh ./.deployment/cleanup.sh;
- name: Create Sync Zip
run: |
cd ./zip
zip -r ../ash.zip ./
cd ../
- name: Upload files to a GitHub release
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ash.zip
tag: ${{ steps.get_version.outputs.tag }}
name: ash.zip
overwrite: true