Merge pull request #355 from linchpin/release-please--branches--master #95
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
on: | |
push: | |
branches: | |
- master | |
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@v4 | |
id: release | |
with: | |
token: ${{ secrets.GH_BOT_TOKEN }} | |
build: | |
needs: release-please | |
runs-on: ubuntu-latest | |
if: ${{ needs.release-please.outputs.release_created }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Get Version From Tag | |
id: get_version | |
uses: linchpin/[email protected] | |
with: | |
semver_only: true | |
- name: Latest Version | |
id: latest_version | |
run: | | |
TAG=${{ steps.get_version.outputs.tag }} | |
echo "VERSION=${TAG#v}" >> $GITHUB_OUTPUT | |
- name: Cache Composer dependencies | |
uses: actions/cache@v4 | |
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: Install Yarn Dependencies | |
run: | | |
yarn install | |
yarn 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 ../courier-notices.zip ./ | |
cd ../ | |
- name: Upload files to a GitHub release | |
uses: svenstaro/[email protected] | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: courier-notices.zip | |
tag: ${{ steps.get_version.outputs.tag }} | |
name: courier-notices.zip | |
overwrite: true | |