From 747ba1c0190b6498826b9b473c86ea8122cf80db Mon Sep 17 00:00:00 2001 From: Nishant Date: Wed, 24 Jan 2024 02:07:14 +0530 Subject: [PATCH] update github actions --- .github/workflows/release.yml | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 686aea4..d93bf50 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,33 +1,22 @@ name: Node.js CI on: - push: - branches: - - main + push: jobs: check: name: Prepare release... - runs-on: ${{ matrix.os }} - strategy: - matrix: - node-version: [20.x] - os: [ubuntu-latest] + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} + - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version: 20.10.0 - name: Install Dependencies run: npm ci + - name: release + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npm publish --access public - maybe-release: - name: release - runs-on: ubuntu-latest - needs: [check] - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - steps: - - run: npm publish --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file