Skip to content

v2.3.1

v2.3.1 #33

Workflow file for this run

name: Release
on:
push:
tags: ['*']
jobs:
release:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: dist/build
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 17
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16.5
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
extensions: gmp
tools: composer:v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build backend
run: |
cd dist/build/backend
composer install --no-dev --optimize-autoloader --no-interaction
bin/doctrine orm:generate-proxies
composer openapi
env:
NEUCORE_APP_ENV: prod
NEUCORE_DATABASE_URL: 'mysql://user:@127.0.0.1/db?serverVersion=10.5.22-MariaDB-1:10.5.22+maria~ubu2004'
- name: Generate OpenAPI client
run: |
cd dist/build/frontend
./openapi.sh
- name: Build OpenAPI client
run: |
cd dist/build/frontend/neucore-js-client
npm install
npm run build
- name: Build frontend
run: |
cd dist/build/frontend
npm install
npm run build
- name: Get the version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Create archive
run: |
dist/build/setup/dist-collect-files.sh
cd dist
tar -czf neucore-${{ env.RELEASE_VERSION }}.tar.gz neucore
sha256sum neucore-${{ env.RELEASE_VERSION }}.tar.gz > neucore-${{ env.RELEASE_VERSION }}.sha256
- name: GitHub Release
uses: softprops/action-gh-release@v1
with:
files: |
dist/neucore-${{ env.RELEASE_VERSION }}.tar.gz
dist/neucore-${{ env.RELEASE_VERSION }}.sha256
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build and publish Docker image
if: ${{ github.repository_owner == 'tkhamez' }}
run: |
echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u tkhamez --password-stdin
docker buildx build --platform linux/amd64,linux/arm64 -f dist/build/setup/Dockerfile --no-cache -t tkhamez/neucore:${{ env.RELEASE_VERSION }} -t tkhamez/neucore:latest --push dist
docker logout