Release 1.5.4 #40
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
on: | |
push: | |
tags: | |
- '*.*.*' | |
name: Create Release | |
jobs: | |
create-release: | |
runs-on: ubuntu-20.04 | |
env: | |
REPO_NAME: ${{ github.event.repository.name }} | |
strategy: | |
fail-fast: true | |
matrix: | |
php: [ '8.1' ] | |
node: [ '14' ] | |
name: Create Release | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Get the tag/version | |
run: | | |
echo "GIT_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | |
- name: Setup PHP, with composer and extensions | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: apcu, ctype, iconv, imagick, json, redis, soap, xmlreader, zip | |
coverage: none | |
- name: Validate composer files | |
run: composer validate composer.json | |
- name: Composer install with exported .env variables | |
run: | | |
set -a && source .env && set +a | |
APP_ENV=prod composer install --no-dev -o | |
- name: Setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Yarn build | |
run: | | |
yarn install | |
yarn run encore production | |
- name: Make build dir | |
run: | | |
mkdir -p ../build | |
- name: Create archive | |
run: | | |
tar \ | |
--exclude ='./.git' \ | |
--exclude='./node_modules' \ | |
--exclude='./var/cache/dev' \ | |
-zcf ../build/"${{ env.REPO_NAME }}"-"${{ env.GIT_TAG }}".tar.gz . | |
- name: Create checksum | |
run: sha256sum ../build/"${{ env.REPO_NAME }}"-"${{ env.GIT_TAG }}".tar.gz > ../build/checksum.txt | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
draft: false | |
prerelease: false | |
- name: Upload archive | |
uses: actions/upload-release-asset@v1 | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ../build/${{ env.REPO_NAME }}-${{ env.GIT_TAG }}.tar.gz | |
asset_name: ${{ env.REPO_NAME }}-${{ env.GIT_TAG }}.tar.gz | |
asset_content_type: application/gzip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload checksum | |
uses: actions/upload-release-asset@v1 | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ../build/checksum.txt | |
asset_name: checksum.txt | |
asset_content_type: text/plain | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |