Merge pull request #353 from linchpin/dependabot/npm_and_yarn/microma… #91
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 | |
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: courier-notices | |
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@v4 | |
- name: Get Version From Tag | |
id: get_version | |
uses: actions-ecosystem/action-get-latest-tag@v1.6.0 | |
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@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/upload-release-action@2.9.0 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: courier-notices.zip | |
tag: ${{ steps.get_version.outputs.tag }} | |
name: courier-notices.zip | |
overwrite: true | |