From 4f34b07b99d4f31e920041699bde754ae9577869 Mon Sep 17 00:00:00 2001 From: Steven Date: Mon, 5 Dec 2022 16:20:59 -0600 Subject: [PATCH] fix: add semantic-release to autopublish --- .github/workflows/ci.yml | 17 +++++++++++------ package.json | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 254e6a4b..2bd0e6d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,9 +8,14 @@ on: - '!*' pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + jobs: test: name: Node ${{ matrix.node }} and ${{ matrix.os }} + timeout-minutes: 30 strategy: fail-fast: false matrix: @@ -18,10 +23,6 @@ jobs: node: [14, 16, 18] runs-on: ${{ matrix.os }} steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.11.0 - with: - access_token: ${{ github.token }} - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node }} uses: actions/setup-node@v3 @@ -29,8 +30,6 @@ jobs: cache: yarn node-version: ${{ matrix.node }} check-latest: true - - name: Print Node Version - run: node --version - name: Install Dependencies run: yarn install - name: Build Test Binary @@ -42,3 +41,9 @@ jobs: - name: Coverage if: matrix.os == 'ubuntu-latest' && matrix.node == 14 # only run once run: yarn test-coverage + - name: Maybe Release + if: matrix.os == 'ubuntu-latest' && matrix.node == 18 && github.event_name == 'push' && github.ref == 'refs/heads/main' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }} + run: npx semantic-release@19.0.5 diff --git a/package.json b/package.json index 95311f37..72611b37 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@vercel/ncc", "description": "Simple CLI for compiling a Node.js module into a single file, together with all its dependencies, gcc-style.", - "version": "0.35.0", + "version": "0.0.0-development", "repository": "vercel/ncc", "license": "MIT", "main": "./dist/ncc/index.js",