Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add deploy steps to build library release artifacts #151

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/test-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,19 @@ jobs:
- name: Checkout php-http-client
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/[email protected]
with:
php-version: '7.4'
id: php

- name: Build Release Artifacts
run: make bundle

- name: Create GitHub Release
uses: sendgrid/dx-automator/actions/release@main
with:
assets: php-http-client.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -68,7 +79,7 @@ jobs:
env:
SLACK_COLOR: failure
SLACK_ICON_EMOJI: ':github:'
SLACK_MESSAGE: ${{ format('Tests *{0}*, Deploy *{1}*, {2}/{3}/actions/runs/{4}', needs.test.result, needs.deploy.result, github.server_url, github.repository, github.run_id) }}
SLACK_MESSAGE: ${{ format('Test *{0}*, Deploy *{1}*, {2}/{3}/actions/runs/{4}', needs.test.result, needs.deploy.result, github.server_url, github.repository, github.run_id) }}
SLACK_TITLE: Action Failure - ${{ github.repository }}
SLACK_USERNAME: GitHub Actions
SLACK_MSG_AUTHOR: twilio-dx
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ vendor/
.php_cs
.php_cs.cache
phpunit.xml

# Build artifacts
php-http-client.zip
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
.PHONY: clean install test

clean:
@rm -rf vendor composer.lock
@rm -rf vendor composer.lock php-http-client.zip

ci-install: clean
composer install --no-dev

install: clean
composer install --no-suggest --no-scripts --no-progress --no-interaction

test: install
vendor/bin/phpunit test/unit

bundle: ci-install
zip -r php-http-client.zip . -x \*.git\* \*composer.json\* \*test\*