-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add deploy steps to build library release artifacts (#151)
Co-authored-by: ahung <[email protected]>
- Loading branch information
Showing
3 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 }} | ||
|
||
|
@@ -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 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,6 @@ vendor/ | |
.php_cs | ||
.php_cs.cache | ||
phpunit.xml | ||
|
||
# Build artifacts | ||
php-http-client.zip |
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
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\* |