Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions templates/drupal-11/.github/workflows/build_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
on:
push:
tags:
- "*.*.*"

name: Create Github Release

permissions:
contents: write

env:
COMPOSE_USER: runner

jobs:
create-release:
runs-on: ubuntu-latest
env:
COMPOSER_ALLOW_SUPERUSER: 1
APP_ENV: prod
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Composer install
run: |
docker network create frontend
docker compose run --rm --user=root phpfpm composer install --no-dev -o --classmap-authoritative
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When env.COMPOSE_USER is set to runner, we don't need --user=… here:

Suggested change
docker compose run --rm --user=root phpfpm composer install --no-dev -o --classmap-authoritative
docker compose run --rm phpfpm composer install --no-dev -o --classmap-authoritative

docker compose run --rm --user=root phpfpm composer clear-cache

- name: Make assets dir
run: |
mkdir -p ../assets

- name: Create archive
run: |
sudo chown -R runner:runner ./
tar --exclude='.git' -zcf ../assets/${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz ./

- name: Create checksum
run: |
cd ../assets
sha256sum ${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz > ../assets/checksum.txt

- name: Create a release in GitHub and uploads assets
run: gh release create ${{ github.ref_name }} --verify-tag --generate-notes ../assets/*.*
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
shell: bash
48 changes: 48 additions & 0 deletions templates/symfony-6/.github/workflows/build_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
on:
push:
tags:
- "*.*.*"

name: Create Github Release

permissions:
contents: write

env:
COMPOSE_USER: runner

jobs:
create-release:
runs-on: ubuntu-latest
env:
COMPOSER_ALLOW_SUPERUSER: 1
APP_ENV: prod
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Composer install
run: |
docker network create frontend
docker compose run --rm --user=root -e APP_ENV=prod phpfpm composer install --no-dev --optimize-autoloader
docker compose run --rm --user=root -e APP_ENV=prod phpfpm composer clear-cache

- name: Make assets dir
run: |
mkdir -p ../assets

- name: Create archive
run: |
sudo chown -R runner:runner ./
tar --exclude='.git' -zcf ../assets/${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz ./

- name: Create checksum
run: |
cd ../assets
sha256sum ${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz > ../assets/checksum.txt

- name: Create a release in GitHub and uploads assets
run: gh release create ${{ github.ref_name }} --verify-tag --generate-notes ../assets/*.*
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
shell: bash