Skip to content

Commit 9abd236

Browse files
authored
chore: add deploy steps to build library release artifacts (#151)
Co-authored-by: ahung <[email protected]>
1 parent b77574d commit 9abd236

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

.github/workflows/test-and-deploy.yml

+12-1
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,19 @@ jobs:
5353
- name: Checkout php-http-client
5454
uses: actions/checkout@v2
5555

56+
- name: Setup PHP
57+
uses: shivammathur/[email protected]
58+
with:
59+
php-version: '7.4'
60+
id: php
61+
62+
- name: Build Release Artifacts
63+
run: make bundle
64+
5665
- name: Create GitHub Release
5766
uses: sendgrid/dx-automator/actions/release@main
67+
with:
68+
assets: php-http-client.zip
5869
env:
5970
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6071

@@ -68,7 +79,7 @@ jobs:
6879
env:
6980
SLACK_COLOR: failure
7081
SLACK_ICON_EMOJI: ':github:'
71-
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) }}
82+
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) }}
7283
SLACK_TITLE: Action Failure - ${{ github.repository }}
7384
SLACK_USERNAME: GitHub Actions
7485
SLACK_MSG_AUTHOR: twilio-dx

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ vendor/
1414
.php_cs
1515
.php_cs.cache
1616
phpunit.xml
17+
18+
# Build artifacts
19+
php-http-client.zip

Makefile

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
.PHONY: clean install test
22

33
clean:
4-
@rm -rf vendor composer.lock
4+
@rm -rf vendor composer.lock php-http-client.zip
5+
6+
ci-install: clean
7+
composer install --no-dev
58

69
install: clean
710
composer install --no-suggest --no-scripts --no-progress --no-interaction
811

912
test: install
1013
vendor/bin/phpunit test/unit
14+
15+
bundle: ci-install
16+
zip -r php-http-client.zip . -x \*.git\* \*composer.json\* \*test\*

0 commit comments

Comments
 (0)