diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 4ca2e46..2e4b496 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -5,40 +5,18 @@ on: tags: ['*'] jobs: - build: + npm: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: 12 - - run: sed -i "s/0.0.0-version-placeholder/${{github.event.release.tag_name}}/" package.json + registry-url: https://registry.npmjs.org/ + - run: echo ::set-env name=GIT_TAG::${GITHUB_REF#refs/*/} + - run: sed -i "s/0.0.0-version-placeholder/${{env.GIT_TAG}}/" package.json - run: npm ci - run: npm run build - - uses: actions/upload-artifact@v1 - with: - name: package - path: package.json - - uses: actions/upload-artifact@v1 - with: - name: build - path: lib - - publish-npm: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 12 - registry-url: https://registry.npmjs.org/ - - uses: actions/download-artifact@v1 - with: - name: package - - uses: actions/download-artifact@v1 - with: - name: build - - run: npm publish + - run: npm publish --access=public env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} diff --git a/.npmignore b/.npmignore index 9ec9b31..8c267c3 100644 --- a/.npmignore +++ b/.npmignore @@ -1,3 +1,4 @@ .idea /src +/.github tsconfig.json