From fde129e5c611b3b10412571d3ca93bb8ec58f424 Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Mon, 25 Sep 2023 22:41:20 +0200 Subject: [PATCH] Build assets on release --- .github/workflows/upload-release-package.yml | 6 ++++++ scripts/release.sh | 2 ++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/upload-release-package.yml b/.github/workflows/upload-release-package.yml index 7deb88dae..32a63b4ef 100644 --- a/.github/workflows/upload-release-package.yml +++ b/.github/workflows/upload-release-package.yml @@ -29,6 +29,12 @@ jobs: env: COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: "Install Node" + uses: actions/setup-node@v3 + with: + node-version-file: ".nvmrc" + cache: "yarn" + - name: Create the package run: make release VERSION=${{ github.event.release.tag_name }} diff --git a/scripts/release.sh b/scripts/release.sh index b9221fb7e..56e47baaf 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -10,6 +10,8 @@ ENV=$4 rm -rf "${TMP_FOLDER:?}"/"$RELEASE_FOLDER" mkdir "$TMP_FOLDER"/"$RELEASE_FOLDER" git clone https://github.com/wallabag/wallabag.git --single-branch --depth 1 --branch $1 "$TMP_FOLDER"/"$RELEASE_FOLDER"/"$VERSION" +cd "$TMP_FOLDER"/"$RELEASE_FOLDER"/"$VERSION" && yarn install --non-interactive +cd "$TMP_FOLDER"/"$RELEASE_FOLDER"/"$VERSION" && yarn run --non-interactive build:prod cd "$TMP_FOLDER"/"$RELEASE_FOLDER"/"$VERSION" && SYMFONY_ENV="$ENV" COMPOSER_MEMORY_LIMIT=-1 composer install -n --no-dev cd "$TMP_FOLDER"/"$RELEASE_FOLDER"/"$VERSION" && php bin/console wallabag:install --env="$ENV" -n cd "$TMP_FOLDER"/"$RELEASE_FOLDER"/"$VERSION" && php bin/console assets:install --env="$ENV" --symlink --relative