-
Notifications
You must be signed in to change notification settings - Fork 19
43 lines (36 loc) · 1.31 KB
/
release.yml
File metadata and controls
43 lines (36 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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: cached dependencies
uses: actions/cache@v3
id: cached-dependencies
with:
path: ./tawkto/vendor
# the key will change if composer.lock changes
key: ${{ runner.os }}-dependencies-${{ hashFiles('**/composer.lock') }}
- name: install dependencies
uses: php-actions/composer@v6
with:
command: run build:prod
- name: version
id: version
run: echo "::set-output name=version::$(jq -r '.version' ./composer.json)"
- name: build artifact
run: composer run package && mv ./tmp/tawkto-live-chat.zip tawkto-live-chat-${{ steps.version.outputs.version }}.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: ./tawkto-live-chat-${{ steps.version.outputs.version }}.zip
asset_name: tawkto-live-chat-${{ steps.version.outputs.version }}.zip
asset_content_type: application/zip