Skip to content

Commit 897558b

Browse files
committed
create release workflow
1 parent 863ee1e commit 897558b

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
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/tawk-url-utils.zip tawk-url-utils.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: ./tawk-url-utils.zip
25+
asset_name: tawk-url-utils.zip
26+
asset_content_type: application/zip

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/vendor/
22
.phpunit.*
33
.phpcs.cache
4+
tmp

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
],
2626
"test": "phpunit",
2727
"lint": "phpcs -p -s -v --runtime-set ignore_warnings_on_exit true .",
28-
"lint:fix": "phpcbf -p -s -v .; err=$?; if [ $err -eq 1 ]; then exit 0; else exit $err; fi;"
28+
"lint:fix": "phpcbf -p -s -v .; err=$?; if [ $err -eq 1 ]; then exit 0; else exit $err; fi;",
29+
"package": "composer run clean && mkdir -p ./tmp && cp -rt ./tmp lib composer.json README.md CHANGELOG.md && zip -9 -rq ./tmp/tawk-url-utils.zip ./tmp",
30+
"clean": "rm -rf ./tmp"
2931
}
3032
}

0 commit comments

Comments
 (0)