name: Publish on: push: branches: - main jobs: Publish npm package action: runs-on: ubuntu-latest steps: - name: 'Checkout repository' uses: actions/checkout@v4 - name: 'Setup dependencies' uses: actions/setup-node@v4 with: node-version: 20 registry-url: https://git.ksv741.keenetic.pro/api/packages/teacinema/npm/ scope: '@teacinema' - name: 'Enable corepack' run: corepack enable - name: Create .npmrc for install dependencies run: | touch .npmrc echo "@teacinema:registry=https://git.ksv741.keenetic.pro/api/packages/teacinema/npm/" >> .npmrc echo "//git.ksv741.keenetic.pro/api/packages/teacinema/npm/:_authToken=${NODE_AUTH_TOKEN}" >> .npmrc env: NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} - name: 'Install dependencies' run: yarn install --frozen-lockfile - name: 'Build' run: yarn run build - name: Remove .npmrc run: rm .npmrc - name: 'Publish to Gitea npm registry' run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}