Skip to content

Commit 910c3ed

Browse files
committed
Added actions release build script
1 parent fd645c1 commit 910c3ed

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
on:
2+
push:
3+
tags:
4+
- '*.*.*'
5+
6+
name: Create Github Release
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
create-release:
13+
runs-on: ubuntu-latest
14+
env:
15+
COMPOSER_ALLOW_SUPERUSER: 1
16+
APP_ENV: prod
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Composer install
22+
run: |
23+
docker network create frontend
24+
docker compose run --rm --user=root --env APP_ENV=prod phpfpm composer install --no-dev -o --classmap-authoritative
25+
docker compose run --rm --user=root --env APP_ENV=prod phpfpm composer clear-cache
26+
27+
- name: Make assets dir
28+
run: |
29+
mkdir -p ../assets
30+
31+
- name: Create archive
32+
run: tar -zcf --exclude='.git' ../assets/${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz ./
33+
34+
- name: Create checksum
35+
run: |
36+
cd ../assets
37+
sha256sum ${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz > ../assets/checksum.txt
38+
39+
- name: Create a release in GitHub and uploads assets
40+
run: gh release create ${{ github.ref_name }} --verify-tag --generate-notes ../assets/*.*
41+
env:
42+
GITHUB_TOKEN: ${{ github.TOKEN }}
43+
shell: bash

0 commit comments

Comments
 (0)