Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v2 | |
id: cached-dependencies | |
with: | |
path: ./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 artifacts | |
run: composer run package | |
- name: upload regular artifact | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./tmp/tawk-oc2-${{ steps.version.outputs.version }}.zip | |
asset_name: tawk-oc2-${{ steps.version.outputs.version }}.zip | |
asset_content_type: application/zip | |
- name: upload ocmod artifact | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./tmp/tawk-oc2-${{ steps.version.outputs.version }}.ocmod.zip | |
asset_name: tawk-oc2-${{ steps.version.outputs.version }}.ocmod.zip | |
asset_content_type: application/zip |