diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 877a580..751ff31 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,6 +6,7 @@ on: pull_request jobs: main: runs-on: ubuntu-latest + timeout-minutes: 10 steps: - uses: actions/checkout@v3 @@ -22,7 +23,7 @@ jobs: restore-keys: npm- - name: Install dependencies - run: npm ci --ignore-scripts + run: npm ci --ignore-scripts --no-audit --no-fund - run: npm run test diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..7fe2155 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,37 @@ +name: Publish Package + +on: + push: + tags: + - 'v**' + +jobs: + publish: + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + id-token: write + steps: + - uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + registry-url: 'https://registry.npmjs.org' + + - name: Use dependencies cache + uses: actions/cache@v3 + with: + path: ~/.npm + key: npm-${{ hashFiles('package-lock.json') }} + restore-keys: npm- + + - name: Install dependencies + run: npm ci --ignore-scripts --no-audit --no-fund + + - name: Publish package + run: npm publish --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} +