From 864e0e3608b96fb7b1cdcb43ccf00d1da5e91d7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B3nio=20Ferreira?= Date: Mon, 26 Aug 2024 11:52:38 +0200 Subject: [PATCH] Fix/change publish pipeline (#2805) * make publish pipeline manual test branch test publish manually remove name checkout test clean up rename and clean up * name and comment change --- .github/workflows/npm-publish.yml | 9 ------- .github/workflows/release-build.yml | 38 +++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/release-build.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 322c4cb2fc..f83232819b 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -6,7 +6,6 @@ name: Publish Package on: release: types: [created] - workflow_dispatch: jobs: publish-npm: @@ -34,11 +33,3 @@ jobs: env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} CI: true - - # Upload UMD and translations - - run: cp packages/server/translations/ packages/lib/dist/umd -r - - uses: actions/upload-artifact@v4 - with: - name: umd-and-translations - path: packages/lib/dist/umd - diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml new file mode 100644 index 0000000000..3585e4503a --- /dev/null +++ b/.github/workflows/release-build.yml @@ -0,0 +1,38 @@ +# This workflow will run tests using node and then publish a package when a release is created +# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages + +name: Build UMD and Translations + +on: + workflow_dispatch: + +jobs: + build-umd-and-translations: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + # Setup .npmrc file to publish to npm + - uses: actions/setup-node@v4 + with: + node-version: 20.12.2 + registry-url: https://registry.npmjs.org/ + + - run: yarn install --frozen-lockfile + + # Build + - name: Build + run: cd packages/lib && npm run build + env: + CI: true + + # Upload UMD and translations + - run: cp packages/server/translations/ packages/lib/dist/umd -r + - uses: actions/upload-artifact@v4 + with: + name: umd-and-translations + path: packages/lib/dist/umd + + + +