Skip to content

Commit

Permalink
build: update release flow
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Oct 4, 2021
1 parent 5d9e711 commit be51225
Show file tree
Hide file tree
Showing 15 changed files with 9,660 additions and 20,236 deletions.
15 changes: 14 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,25 @@
"overrides": [
{
"files": [
"./gulpfile.js",
"./*.js",
"./private/**/*"
],
"env": {
"node": true,
"browser": false
},
"rules": {
"max-len": "off",
"no-magic-numbers": "off",
"no-console": "off"
}
},
{
"files": [
"./release.config.js"
],
"rules": {
"no-template-curly-in-string": "off"
}
}
]
Expand Down
52 changes: 11 additions & 41 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build and publish
on:
push:
branches:
- master
- main
paths:
- controllers/**/*
- mails/**/*
Expand All @@ -19,9 +19,9 @@ on:
- package.json

jobs:
build:
name: Build 📦
runs-on: ubuntu-20.04
release:
name: Build and publish 🚀
runs-on: ubuntu-latest
steps:
# Set up environment
- name: Set up PHP
Expand Down Expand Up @@ -60,43 +60,13 @@ jobs:
# Install dependencies
- name: Install composer dependencies
run: composer install --no-dev
run: composer install --no-ansi --no-dev --no-interaction --no-plugins --no-progress --no-scripts --optimize-autoloader
- name: Install npm dependencies
run: npm ci --no-optional

# Build the modules
- name: Create build
run: npx gulp build

# Upload artifacts for publish stage
- name: Upload build
uses: actions/upload-artifact@v2
with:
name: dist
path: |
dist/*.zip
run: npm ci --production=false --no-optional

release:
name: Publish 🚀
runs-on: ubuntu-latest
needs:
- build
steps:
- uses: actions/checkout@v2
- name: Handle NPM cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Get build
uses: actions/download-artifact@v1
with:
name: dist
- name: Install semantic release plugins
run: npm i conventional-changelog-conventionalcommits --no-optional
- name: Run semantic release
uses: cycjimmy/semantic-release-action@v2
# Run release tasks
- name: Release
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
13 changes: 0 additions & 13 deletions .releaserc

This file was deleted.

149 changes: 149 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
### [1.1.2](https://github.com/myparcelnl/prestashop/compare/v1.1.3...v1.1.2) (2021-09-30)


### :sparkles: New Features

* add surcharge option to delivery options ([baebd38](https://github.com/myparcelnl/prestashop/commit/baebd381626d09bbe7ee815ab4e8e0891396c140))


### :bug: Bug Fixes

* cutofftime and dropoffdelay work according to current specifications ([572c778](https://github.com/myparcelnl/prestashop/commit/572c7789b152c125ecc888ef03553b4d16c4edf3))
* no order found error ([3a7e68c](https://github.com/myparcelnl/prestashop/commit/3a7e68c94fa18a53413b55544bc0a5097d16fd31)), closes [#7](https://github.com/myparcelnl/prestashop/issues/7)
* open new tab and request inline pdf correctly according to setting ([3ce9d87](https://github.com/myparcelnl/prestashop/commit/3ce9d87a1792f1a6d1aec68aa3bca129b5c297d9))

### [1.1.3](https://github.com/myparcelnl/prestashop/compare/v1.1.2...v1.1.3) (2021-09-01)


### :bug: Bug Fixes

* export ROW and EU shipments ([50cb1e7](https://github.com/myparcelnl/prestashop/commit/50cb1e76d9bc2d40cdea37277efdbcec2a39282e))
* use default HS code and country of origin for products that lack them ([a3b5da0](https://github.com/myparcelnl/prestashop/commit/a3b5da025a8744bd364cc5237f1c3379b8362ce4))

### [1.1.2](https://github.com/myparcelnl/prestashop/compare/v1.1.1...v1.1.2) (2021-08-19)


### :bug: Bug Fixes

* missing carrier type for upgrades ([caff3c9](https://github.com/myparcelnl/prestashop/commit/caff3c93d20be2a6713da0df76191fe1ca05a137))

### [1.1.1](https://github.com/myparcelnl/prestashop/compare/v1.1.0...v1.1.1) (2021-08-17)


### :sparkles: New Features

* add cart override ([e510832](https://github.com/myparcelnl/prestashop/commit/e510832e2e59f47ea7b16e25929400830f9dfe12))
* add postnl ([add4716](https://github.com/myparcelnl/prestashop/commit/add47169f1c58d44f9496aab1c977875e8849216))
* add ps carriers cost ([1f7e70e](https://github.com/myparcelnl/prestashop/commit/1f7e70e5be0b326bdcb0e575bdef47392b328521))
* add ps_carriers in the configuration ([fa88381](https://github.com/myparcelnl/prestashop/commit/fa883813afcc1794c995173618797673cf87c81b))
* added carriertype ([ec6f8af](https://github.com/myparcelnl/prestashop/commit/ec6f8af16b0b5673ef765fb958f221ea86e7ac60))
* allow to update carrier ([5370b87](https://github.com/myparcelnl/prestashop/commit/5370b871ff4ac76180b86f038a0c41028488a70c))
* override DeliveryOptionsFinder for prestashop carriers ([946c20d](https://github.com/myparcelnl/prestashop/commit/946c20d867a14dd2d8f1139d752d977faf01a32f))
* show carrier input if no selected ps carrier ([a36bf03](https://github.com/myparcelnl/prestashop/commit/a36bf03ed23f137a7a2b8c771b1816010f0b95d3))
* update method for carrier config ([7f24f4b](https://github.com/myparcelnl/prestashop/commit/7f24f4b676c8de4bf954eb40a03446f4fa7effa6))
* use carrierType ([6416306](https://github.com/myparcelnl/prestashop/commit/64163063a02842e5289c65bbd9d32b9a1af4d720))


### :bug: Bug Fixes

* 0 problem ([325ed7a](https://github.com/myparcelnl/prestashop/commit/325ed7aa6b1b0b511734db73cb9106c008c145df))
* add new custom carrier/ add PS carrier, ([1a3a6bf](https://github.com/myparcelnl/prestashop/commit/1a3a6bfd6cdaca3f1ec011dfcf3300c7d29b439a))
* delivery option removed ([21da4a2](https://github.com/myparcelnl/prestashop/commit/21da4a25788b4d438fd2e275e6206f440d20a2a6))
* deliverydays_windows ([0c2d1e8](https://github.com/myparcelnl/prestashop/commit/0c2d1e823db79e98ccb27306c5a8fa671f6d0869))
* export with the correct delivery type ([2dec77e](https://github.com/myparcelnl/prestashop/commit/2dec77ec4b9a6b6535014e9e003f0a84192edd19))
* if no carrier ([80aea3f](https://github.com/myparcelnl/prestashop/commit/80aea3f17950b5c1ca083d54f6eeb34ae7a1c5f5))
* import validation and db ([a354615](https://github.com/myparcelnl/prestashop/commit/a3546157e7d509b3ac83306237a5fd1eaa03ecab))
* load OrderLabel that is not in namespace anymore ([1b5a04a](https://github.com/myparcelnl/prestashop/commit/1b5a04af08806f58b07057d06f040e6ecd4da8ed))
* new carrier with redirect and flash message ([79bcc8e](https://github.com/myparcelnl/prestashop/commit/79bcc8e603c5d4a97049cae21e45c157912e2953))
* new carrier with redirect and flash message ([fb58ba7](https://github.com/myparcelnl/prestashop/commit/fb58ba749d8740afae5486bd6914a1ac2b69662e))
* newly added carrier ([d430d37](https://github.com/myparcelnl/prestashop/commit/d430d379b9557d143fa9c1ab98d3b0a55a4fa1c4))
* pass on the weights for all shipments ([1740f85](https://github.com/myparcelnl/prestashop/commit/1740f85386d97fe515ed93f9ebe61657be4aabb0))
* prestashop PrestaShopDatabaseException problem ([644e078](https://github.com/myparcelnl/prestashop/commit/644e07807c23bebf41f818fdf1174297116048fa))
* put back insert for new carrier ([dbbbf39](https://github.com/myparcelnl/prestashop/commit/dbbbf39dc4a27f241d799e7e15729ad0f802319a))
* remove console.log ([680daf6](https://github.com/myparcelnl/prestashop/commit/680daf625eb677b08336e70566673ba22112de8c))
* remove legacy 'OrderLabel' classmap ([f4444b3](https://github.com/myparcelnl/prestashop/commit/f4444b3f0082ed32106c12729ae0b393c6705206))
* remove override ([04bc88a](https://github.com/myparcelnl/prestashop/commit/04bc88ab94925a9a84f4b1173eef0042167d0fc1))
* remove unused config ([34eb129](https://github.com/myparcelnl/prestashop/commit/34eb12999d6f2eb0dbcc3546177581caa2bd4da9))
* remove validation ([abe02ab](https://github.com/myparcelnl/prestashop/commit/abe02abf5cd8d896384ef96f6dbab61c3fb7de07))
* set ps carrier as myparcel carrier ([8c67199](https://github.com/myparcelnl/prestashop/commit/8c67199a0436aeee1f68e67555c8ad7d5e634b70))
* set to static ([f7bdcae](https://github.com/myparcelnl/prestashop/commit/f7bdcae89501381cc052e7b2cd38348a02a627ff))
* update carrierType ([6fceb82](https://github.com/myparcelnl/prestashop/commit/6fceb82341a0d0e849506b18effb6ddcd875c59e))
* Update readme.md ([deb635b](https://github.com/myparcelnl/prestashop/commit/deb635b83aaaa90f4b20af84ac229383c31118ae))
* use the track trace link which is already known in the order ([198b0b4](https://github.com/myparcelnl/prestashop/commit/198b0b4bfa7c5e4563c452e34eb2a435a85165fb))
* webhook not changing order status ([aae145f](https://github.com/myparcelnl/prestashop/commit/aae145f77755ee88c9b8a68616e00194cf8e7920))

## [1.1.0](https://github.com/myparcelnl/prestashop/compare/v1.0.7...v1.1.0) (2021-05-28)


### :sparkles: New Features

* add new carrier ([4685332](https://github.com/myparcelnl/prestashop/commit/4685332dbb125619cd6660bf999ee361ad6cc544))


### :bug: Bug Fixes

* remove search ([5b0bc01](https://github.com/myparcelnl/prestashop/commit/5b0bc01e2e9ec4f4448638087a2fb176cf8266a3))

### [1.0.7](https://github.com/myparcelnl/prestashop/compare/v1.0.6...v1.0.7) (2021-05-21)


### :bug: Bug Fixes

* add tax to prices, remove unused method calls ([aaeb3b0](https://github.com/myparcelnl/prestashop/commit/aaeb3b0002d097b99e1604de7fc547a178bcfc01))


### Performance Improvements

* remove comments ([bbb9333](https://github.com/myparcelnl/prestashop/commit/bbb9333bc257c4f877a5b78bbefbe3835bbcdf6e))
* remove variable, add method getShippingoption ([01a8557](https://github.com/myparcelnl/prestashop/commit/01a8557940b4305282584a94da7f314c45974186))

### [1.0.6](https://github.com/myparcelnl/prestashop/compare/v1.0.5...v1.0.6) (2021-05-14)


### :bug: Bug Fixes

* add pSQL in query ([fcf7a6c](https://github.com/myparcelnl/prestashop/commit/fcf7a6c391413413f3b216e6bb376a1fe68a4553))

### [1.0.5](https://github.com/myparcelnl/prestashop/compare/v1.0.4...v1.0.5) (2021-05-07)


### :sparkles: New Features

* upgrade to 4.0.0 ([18caea0](https://github.com/myparcelnl/prestashop/commit/18caea01efce310c15d113d55557ac1bb2e046fc))

### [1.0.4](https://github.com/myparcelnl/prestashop/compare/v1.0.3...v1.0.4) (2021-04-30)


### :bug: Bug Fixes

* LabelsColumn defaults ([9132bb5](https://github.com/myparcelnl/prestashop/commit/9132bb5fd76bfd40cc64952e54a11dcc61daa9c5))
* order label column for PS v1.7.7.3+ ([a321b94](https://github.com/myparcelnl/prestashop/commit/a321b94fff0cef5a36a31310fb8215cfabf2bc0c))

### [1.0.3](https://github.com/myparcelnl/prestashop/compare/v1.0.2...v1.0.3) (2021-04-08)


### :bug: Bug Fixes

* **build:** do rename on each job ([78b585f](https://github.com/myparcelnl/prestashop/commit/78b585fdf5f2a94b3ab8f13c0a814a4d193582b5))

### [1.0.2](https://github.com/myparcelnl/prestashop/compare/v1.0.1...v1.0.2) (2021-04-08)


### :sparkles: New Features

* **build:** only ci on tags ([14c7701](https://github.com/myparcelnl/prestashop/commit/14c77016a1d9d7f93aa1421406411637a4d5519f))
* gitlab ci ([6f9f9ee](https://github.com/myparcelnl/prestashop/commit/6f9f9eee151784cb5bfc1a0386e2be8fbcaa3139))


### :bug: Bug Fixes

* **build:** only run on tags ([b61c89d](https://github.com/myparcelnl/prestashop/commit/b61c89ded822115e9e5930a72985a8166bbf9125))
* **build:** php version and npm ([e08c5a6](https://github.com/myparcelnl/prestashop/commit/e08c5a6c0c711a32306e357628eeb6f23a8a5f2c))
* **build:** rename main module file ([a8d858e](https://github.com/myparcelnl/prestashop/commit/a8d858ed75ec26d4db33bc32b240a7d1d72d8eba))
* **build:** replace be to nl ([db5a1ac](https://github.com/myparcelnl/prestashop/commit/db5a1ac04e9edd24fcab610fa46023d622de3052))
* use ps generated url ([8515606](https://github.com/myparcelnl/prestashop/commit/85156063959ef0f48c063e5cd32d26677898957c))

### [1.0.1](https://github.com/myparcelnl/prestashop/compare/v1.0.0...v1.0.1) (2021-03-25)

## 1.0.0 (2021-01-28)

18 changes: 0 additions & 18 deletions Dockerfile

This file was deleted.

7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# PrestaShop MyParcel Module

[![Latest release](https://img.shields.io/github/v/release/myparcelnl/prestashop?labelColor=white&label=Latest%20release)](https://github.com/myparcelnl/prestashop/releases)
![Supported PrestaShop Version](https://img.shields.io/badge/Prestashop-%3E1.7-gray?labelColor=DF0067&logo=prestashop)
![Supported PHP Version](https://img.shields.io/badge/PHP-%3E=7.2-B0B3D6?labelColor=white&logo=php)

> ### Voor de handleiding en meer informatie, ga naar https://myparcelnl.github.io/prestashop/
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gett/myparcelbe",
"description": "PrestaShop module to integrate with MyParcel NL and MyParcel BE",
"name": "myparcelnl/prestashop-module",
"version": "1.1.2",
"require": {
"php": ">=7.2.0",
"myparcelnl/sdk": "^5.2"
Expand All @@ -16,7 +16,7 @@
"myparcelbe.php",
"src/Model/OrderLabel.php"
],
"exclude-from-classmap": []
"exclude-from-classmap": [ ]
},
"config": {
"preferred-install": "dist",
Expand All @@ -27,4 +27,4 @@
"scripts": {
"format": "vendor/bin/php-cs-fixer fix ."
}
}
}
4 changes: 2 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ const babelify = require('babelify');
const browserify = require('browserify');
const buffer = require('vinyl-buffer');
const clean = require('gulp-clean');
const {execSync} = require('child_process');
const {exec} = require('child_process');
const gulp = require('gulp');
const packageJson = require('./package.json');
const rename = require('gulp-rename');
const {replaceCaseSensitive} = require('./private/replaceCaseSensitive');
const sourcemaps = require('gulp-sourcemaps');
const tap = require('gulp-tap');
const uglify = require('gulp-uglify');
const zip = require('gulp-zip');
const {exec} = require('child_process');

const MODULE_NAME_NL = 'myparcelnl';
const MODULE_NAME_BE = 'myparcelbe';
Expand All @@ -20,7 +20,7 @@ const moduleNameMap = {
[MODULE_NAME_BE]: 'MyParcelBE',
};

const lastGitTag = execSync('git describe --abbrev=0 --t').toString().trim();
const {version} = packageJson;

/**
* Files where module name should be transformed in filenames and contents.
Expand Down Expand Up @@ -60,7 +60,6 @@ const copyFiles = [
* @type {string[]}
*/
const excludeFiles = [
'composer.json',
'composer.lock',
'package-lock.json',
'package.json',
Expand Down Expand Up @@ -144,7 +143,7 @@ function createZipTask(moduleName) {
`./dist/${moduleName}/**/*`,
...excludeFiles.map((filename) => `!./dist/${moduleName}/${filename}`),
], {base: 'dist'})
.pipe(zip(`${moduleNameMap[moduleName]}-${lastGitTag}.zip`))
.pipe(zip(`${moduleNameMap[moduleName]}-${version}.zip`))
.pipe(gulp.dest('dist'));
}

Expand Down
Loading

0 comments on commit be51225

Please sign in to comment.