Skip to content

Commit

Permalink
Merge pull request #28 from wanasyraf96/github-workflow
Browse files Browse the repository at this point in the history
GitHub workflow
  • Loading branch information
eug-L authored Jul 18, 2024
2 parents 8ab833b + db0db12 commit 6f6f9dc
Show file tree
Hide file tree
Showing 6 changed files with 2,218 additions and 3,256 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: create-release-artifact

on:
release:
types: [published]

jobs:
create-release-artifact:
name: Creating release artifact
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2

- name: build artifact
run: composer run package && mv ./tmp/tawkmagento2.zip tawkmagento2.zip

- name: upload artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./tawkmagento2.zip
asset_name: tawkmagento2.zip
asset_content_type: application/zip
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ dev
node_modules
.eslintcache
.stylelintcache
tmp
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Don’t have a tawk.to account yet? [Create one here.](https://tawk.to/?utm_sour
2. Install the extension by executing `php composer.phar require tawk/widget`.

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

### Manual Installation
1. Download the extension [installation files here](https://github.com/tawk/tawk-magento-2/archive/master.zip).
2. Extract the tawk-magento-2-master folder from the package.
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).
1. Download the latest zip file [here](https://github.com/tawk/tawk-magento-2/releases).
2. Extract the package.
3. Copy the contents to `<magento-installation-root-folder>/app/code/Tawk/Widget` folder of your website (create a new folder if necessary).
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"`.
5. Install the dependency `tawk-url-util` by executing `php composer.phar require tawk/url-utils`.

Expand All @@ -53,9 +53,9 @@ php bin/magento cache:clean
```

### Manual Installation
1. Download the latest extension [installation files here](https://github.com/tawk/tawk-magento-2/archive/master.zip).
2. Extract the tawk-magento-2-master folder from the package.
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).
1. Download the latest zip file [here](https://github.com/tawk/tawk-magento-2/releases).
2. Extract the package.
3. Copy the contents to `<magento-installation-root-folder>/app/code/Tawk/Widget` folder of your website (create a new folder if necessary).
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"`.
5. Install the dependency `tawk-url-util` by executing `php composer.phar require tawk/url-utils`.
3. Then run the following magento commands to upgrade the extension.
Expand Down
13 changes: 11 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
"tawk/url-utils": "^2.0"
},
"autoload": {
"files": [ "registration.php" ],
"files": [
"registration.php"
],
"psr-4": {
"Tawk\\Widget\\": ""
}
Expand All @@ -50,7 +52,9 @@
"build:dev": "composer install",
"build:prod": "composer install --no-dev",
"lint": "phpcs -p -s -v --runtime-set ignore_warnings_on_exit true .",
"lint:fix": "phpcbf -p -s -v .; err=$?; if [ $err -eq 1 ]; then exit 0; else exit $err; fi;"
"lint:fix": "phpcbf -p -s -v .; err=$?; if [ $err -eq 1 ]; then exit 0; else exit $err; fi;",
"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)",
"clean": "rm -rf ./tmp"
},
"repositories": {
"magento": {
Expand All @@ -61,5 +65,10 @@
"type": "vcs",
"url": "https://github.com/tawk/tawk-url-utils.git"
}
},
"config": {
"allow-plugins": {
"magento/composer-dependency-version-audit-plugin": true
}
}
}
Loading

0 comments on commit 6f6f9dc

Please sign in to comment.