Skip to content

Commit 5325e40

Browse files
author
Pierce Harmon
committed
fix: implement CD w/ release please
1 parent 298fe9b commit 5325e40

5 files changed

Lines changed: 21 additions & 49 deletions

File tree

.github/workflows/CD.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: CD
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release-please:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: GoogleCloudPlatform/release-please-action@v2
13+
id: release
14+
with:
15+
release-type: simple
16+
package-name: shipengine/shipengine
Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
1313
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
1414

1515
jobs:
16-
php_tests:
16+
ci:
1717
name: shipengine-php test suite
1818
runs-on: ubuntu-latest
1919
steps:
@@ -36,19 +36,3 @@ jobs:
3636
- run: phpstan analyse src --level 5
3737
- run: phpunit
3838
- run: ./vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v
39-
40-
deploy:
41-
needs: [php_tests]
42-
if: ${{ success() && contains(github.event.head_commit.message, 'packagist release') }}
43-
name: Publish to Packagist
44-
runs-on: ubuntu-latest
45-
steps:
46-
- name: Checkout
47-
uses: actions/checkout@v2
48-
- name: Release
49-
uses: softprops/action-gh-release@v1
50-
if: startsWith(github.ref, 'refs/tags/')
51-
with:
52-
body_path: ${{ github.workflow }}-CHANGELOG.md
53-
env:
54-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +0,0 @@
1-
# Changelog
2-
3-
All notable changes to this project will be documented in this file.
4-
5-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7-
8-
## [Unreleased]
9-
10-
## [0.0.2-alpha] - 2020-12-23
11-
### Added
12-
- A shipment tracking service with the ability to track shipments by carrier code / tracking number or package id.
13-
14-
### Changed
15-
- The underlying handling of info, warning, and error messages.
16-
- Model classes are a directory down. E.g., `ShipEngine\Model\Address\Query` instead of `ShipEngine\Model\AddressQuery`.
17-
18-
## [0.0.1-alpha] - 2020-12-04
19-
### Added
20-
- The base ShipEngine client.
21-
- An Addresses service with the ability to query, validate, and normalize an address.
22-
23-
[Unreleased]: https://github.com/ShipEngine/shipengine-php/compare/v0.0.2-alpha...HEAD
24-
[0.0.2-alpha]: https://github.com/ShipEngine/shipengine-php/releases/tag/v0.0.2-alpha
25-
[0.0.1-alpha]: https://github.com/ShipEngine/shipengine-php/releases/tag/v0.0.1-alpha

scripts/bumpVersion.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/ShipEngine.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
namespace ShipEngine;
46

@@ -92,7 +94,7 @@ public function validateAddresses($params, $config = null): array
9294
return $apiResponse;
9395
}
9496

95-
/**
97+
/**
9698
* When retrieving rates for shipments using the /rates endpoint, the returned information contains a rateId
9799
* property that can be used to generate a label without having to refill in the shipment information repeatedly.
98100
* See: https://shipengine.github.io/shipengine-openapi/#operation/create_label_from_rate
@@ -224,5 +226,4 @@ public function trackUsingCarrierCodeAndTrackingNumber($carrierCode, $trackingNu
224226

225227
return $apiResponse;
226228
}
227-
228229
}

0 commit comments

Comments
 (0)