From 19714bf34685068a65f10bb05b282ccce892b7a8 Mon Sep 17 00:00:00 2001 From: Daniil Lohvinov Date: Wed, 13 Mar 2024 00:09:37 +0200 Subject: [PATCH] fix to prev --- .github/workflows/publish.yml | 20 -------------------- .github/workflows/release.yml | 14 +++++++++++++- 2 files changed, 13 insertions(+), 21 deletions(-) delete mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index acef3b7d2..000000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Publish Package to npmjs -on: - release: - types: [ created, edited, released ] -jobs: - build: - 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 - registry-url: 'https://registry.npmjs.org' - - run: npm ci - - run: npm run build - - run: npm publish --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c449298b4..41bd4bd01 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,13 +33,25 @@ jobs: id: create_release uses: softprops/action-gh-release@v1 with: - token: ${{ secrets.DLOHVINOV_GITHUB_SECRET }} #https://stackoverflow.com/a/60418414 tag_name: ${{ steps.package-version.outputs.current-version}} name: "Webitel UI Release ${{ steps.package-version.outputs.current-version}}" body: "This is a release of Webitel UI version ${{ steps.package-version.outputs.current-version}}, built on ${{ github.run_date }}" fail_on_unmatched_files: true files: docs.zip + - name: Publish release + # Setup .npmrc file to publish to npm + uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: 'https://registry.npmjs.org' + - run: npm ci + - run: npm run build + - run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + # - name: Upload build artifacts # id: upload_artifacts # uses: actions/upload-artifact@v3