From c6bba9de72fad42d83a749c63432d1c48358f5bf Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Fri, 15 Dec 2023 15:35:02 +0400 Subject: [PATCH 1/2] add publish assets action --- .github/workflows/release-package.yml | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/release-package.yml diff --git a/.github/workflows/release-package.yml b/.github/workflows/release-package.yml new file mode 100644 index 00000000..63e77c11 --- /dev/null +++ b/.github/workflows/release-package.yml @@ -0,0 +1,33 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Publish Assets + +on: + release: + types: [created] + +jobs: + upload-assets: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 20.x + cache: 'npm' + - run: yarn install + - run: yarn build + + - name: Install zip + uses: montudor/action-zip@v1 + + - name: Zip output + run: zip -qq -r build-public.zip . + working-directory: '.output/public' + + - name: Upload build + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: '.output/public/build-public.zip' From b2efed0fd02c4caa8cdae40bbc5ee04790a2b5cb Mon Sep 17 00:00:00 2001 From: Andrey Kuchuk Date: Sat, 16 Dec 2023 10:27:42 +0300 Subject: [PATCH 2/2] Change yarn build to yarn generate --- .github/workflows/release-package.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-package.yml b/.github/workflows/release-package.yml index 63e77c11..661863eb 100644 --- a/.github/workflows/release-package.yml +++ b/.github/workflows/release-package.yml @@ -17,17 +17,17 @@ jobs: node-version: 20.x cache: 'npm' - run: yarn install - - run: yarn build + - run: yarn generate - name: Install zip uses: montudor/action-zip@v1 - name: Zip output - run: zip -qq -r build-public.zip . - working-directory: '.output/public' + run: zip -qq -r artifacts.zip . + working-directory: 'dist' - name: Upload build uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: - files: '.output/public/build-public.zip' + files: 'dist/artifacts.zip'