From 03e4b4480cfb130a6f26c5059fd19022f9aff42c Mon Sep 17 00:00:00 2001 From: Damian Date: Tue, 30 Apr 2024 23:30:22 +0300 Subject: [PATCH 1/2] fix: publish action --- .github/workflows/publish.yml | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c93cb5e..8cec41a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,35 +1,36 @@ name: Publish on: + push: + branches: + - main workflow_dispatch: permissions: contents: write jobs: - release: - name: Release + publish-npm: runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Setup Node.js - uses: actions/setup-node@v4 + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 with: - node-version: lts/* + node-version: '18.x' + registry-url: https://registry.npmjs.org/ - name: Install dependencies run: npx ci - - name: Install semantic-release extra plugins - run: npm install --save-dev @semantic-release/changelog @semantic-release/git - name: Lint run: npm run lint:fix - name: Test run: npm run test --if-present - - name: Build - run: npm run build - - name: Release + - name: Create release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: npm config set access public && npx semantic-release + run: | + RELEASE_TAG=v$(node -p "require('./package.json').version") + gh release create $RELEASE_TAG --target=$GITHUB_SHA --title="$RELEASE_TAG" --generate-notes + - name: Publish to npmjs + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + run: npm publish --access=public From 75a72489dcfecd25c6fb088a7bf12666d9934d2e Mon Sep 17 00:00:00 2001 From: Damian Date: Tue, 30 Apr 2024 23:31:32 +0300 Subject: [PATCH 2/2] chore: v up --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8fbbe45..dfcac3b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@itheum/sdk-mx-enterprise", - "version": "0.3.0-semantic-release", + "version": "0.3.0", "description": "SDK for Itheum's Enterprise technology", "main": "out/index.js", "types": "out/index.d.js",