diff --git a/.github/workflows/github-publish.yml b/.github/workflows/github-publish.yml index 92d5824..2142d9d 100644 --- a/.github/workflows/github-publish.yml +++ b/.github/workflows/github-publish.yml @@ -1,6 +1,7 @@ name: github-publish on: + workflow_dispatch: push: tags: - 'v*.*.*' @@ -11,10 +12,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@master - - uses: actions/setup-node@v1 + uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: - node-version: "12.x" + node-version: 14 registry-url: "https://npm.pkg.github.com" scope: "@hitz-group" - name: Install Node Dependencies diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 1a01f2f..4deb2ce 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,30 +1,27 @@ name: npm-publish on: push: - branches: - - master + tags: + - 'v*.*.*' + jobs: npm-publish: name: npm-publish runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: - token: ${{ secrets.DEPLOYMENT_TOKEN }} + node-version: 14 + registry-url: https://registry.npmjs.org/ - name: Install Node Dependencies run: yarn install - name: Build packages run: yarn build env: CI: "TRUE" - - name: Publish if version has been updated - uses: pascalgn/npm-publish-action@06e0830ea83eea10ed4a62654eeaedafb8bf50fc - with: # All of theses inputs are optional - tag_name: "v%s" - tag_message: "v%s" - commit_pattern: "^Release (\\S+)" - workspace: "." + - name: Publish package + run: npm publish --access public env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} + NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}