Skip to content

Commit 6f6f9dc

Browse files
authored
Merge pull request #28 from wanasyraf96/github-workflow
GitHub workflow
2 parents 8ab833b + db0db12 commit 6f6f9dc

File tree

6 files changed

+2218
-3256
lines changed

6 files changed

+2218
-3256
lines changed

.github/workflows/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: create-release-artifact
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
create-release-artifact:
9+
name: Creating release artifact
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: checkout
13+
uses: actions/checkout@v2
14+
15+
- name: build artifact
16+
run: composer run package && mv ./tmp/tawkmagento2.zip tawkmagento2.zip
17+
18+
- name: upload artifact
19+
uses: actions/upload-release-asset@v1
20+
env:
21+
GITHUB_TOKEN: ${{ github.token }}
22+
with:
23+
upload_url: ${{ github.event.release.upload_url }}
24+
asset_path: ./tawkmagento2.zip
25+
asset_name: tawkmagento2.zip
26+
asset_content_type: application/zip

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ dev
44
node_modules
55
.eslintcache
66
.stylelintcache
7+
tmp

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Don’t have a tawk.to account yet? [Create one here.](https://tawk.to/?utm_sour
2424
2. Install the extension by executing `php composer.phar require tawk/widget`.
2525

2626
### Composer Artifact Installation
27-
1. Download the extension [installation files here](https://github.com/tawk/tawk-magento-2/archive/master.zip).
27+
1. Download the latest zip file [here](https://github.com/tawk/tawk-magento-2/releases).
2828
2. Create a folder in `<magento-installation-root-folder>` called `artifacts`.
2929
3. Copy the zip file to `<magento-installation-root-folder>/artifacts`.
3030
4. Add the repositories to your Composer repositories by executing the following commands
@@ -33,9 +33,9 @@ Don’t have a tawk.to account yet? [Create one here.](https://tawk.to/?utm_sour
3333
5. Install the extension by executing `php composer.phar require tawk/widget`.
3434

3535
### Manual Installation
36-
1. Download the extension [installation files here](https://github.com/tawk/tawk-magento-2/archive/master.zip).
37-
2. Extract the tawk-magento-2-master folder from the package.
38-
3. Copy the contents of tawk-magento-2-master folder to `<magento-installation-root-folder>/app/code/Tawk/Widget` folder of your website (create a new folder if necessary).
36+
1. Download the latest zip file [here](https://github.com/tawk/tawk-magento-2/releases).
37+
2. Extract the package.
38+
3. Copy the contents to `<magento-installation-root-folder>/app/code/Tawk/Widget` folder of your website (create a new folder if necessary).
3939
4. Add the dependency repository to your Composer repositories by executing `php composer.phar config repositories.tawk-url-utils vcs "https://github.com/tawk/tawk-url-utils.git"`.
4040
5. Install the dependency `tawk-url-util` by executing `php composer.phar require tawk/url-utils`.
4141

@@ -53,9 +53,9 @@ php bin/magento cache:clean
5353
```
5454

5555
### Manual Installation
56-
1. Download the latest extension [installation files here](https://github.com/tawk/tawk-magento-2/archive/master.zip).
57-
2. Extract the tawk-magento-2-master folder from the package.
58-
3. Copy the contents of tawk-magento-2-master folder to `<magento-installation-root-folder>/app/code/Tawk/Widget` folder of your website (create a new folder if necessary).
56+
1. Download the latest zip file [here](https://github.com/tawk/tawk-magento-2/releases).
57+
2. Extract the package.
58+
3. Copy the contents to `<magento-installation-root-folder>/app/code/Tawk/Widget` folder of your website (create a new folder if necessary).
5959
4. Add the dependency repository to your Composer repositories by executing `php composer.phar config repositories.tawk-url-utils vcs "https://github.com/tawk/tawk-url-utils.git"`.
6060
5. Install the dependency `tawk-url-util` by executing `php composer.phar require tawk/url-utils`.
6161
3. Then run the following magento commands to upgrade the extension.

composer.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
"tawk/url-utils": "^2.0"
2828
},
2929
"autoload": {
30-
"files": [ "registration.php" ],
30+
"files": [
31+
"registration.php"
32+
],
3133
"psr-4": {
3234
"Tawk\\Widget\\": ""
3335
}
@@ -50,7 +52,9 @@
5052
"build:dev": "composer install",
5153
"build:prod": "composer install --no-dev",
5254
"lint": "phpcs -p -s -v --runtime-set ignore_warnings_on_exit true .",
53-
"lint:fix": "phpcbf -p -s -v .; err=$?; if [ $err -eq 1 ]; then exit 0; else exit $err; fi;"
55+
"lint:fix": "phpcbf -p -s -v .; err=$?; if [ $err -eq 1 ]; then exit 0; else exit $err; fi;",
56+
"package": "composer run clean && mkdir -p ./tmp/tawkmagento2 && cp -r ./view ./tmp/tawkmagento2 && cp -r ./etc ./tmp/tawkmagento2 && cp -r ./Setup ./tmp/tawkmagento2 && cp -r ./Model ./tmp/tawkmagento2 && cp -r ./Controller ./tmp/tawkmagento2 && cp -r ./Block ./tmp/tawkmagento2 && cp -r ./Helper ./tmp/tawkmagento2 && cp ./registration.php ./tmp/tawkmagento2 && cp ./composer.json ./tmp/tawkmagento2 && cp README.md ./tmp/tawkmagento2 && (cd ./tmp && zip -9 -rq ./tawkmagento2.zip ./tawkmagento2)",
57+
"clean": "rm -rf ./tmp"
5458
},
5559
"repositories": {
5660
"magento": {
@@ -61,5 +65,10 @@
6165
"type": "vcs",
6266
"url": "https://github.com/tawk/tawk-url-utils.git"
6367
}
68+
},
69+
"config": {
70+
"allow-plugins": {
71+
"magento/composer-dependency-version-audit-plugin": true
72+
}
6473
}
6574
}

0 commit comments

Comments
 (0)