Skip to content

Commit

Permalink
feat: add semantic-release to autopublish (#1015)
Browse files Browse the repository at this point in the history
Closes #1000
  • Loading branch information
styfle committed Dec 5, 2022
1 parent 92801d6 commit be3405d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/ci.yml
Expand Up @@ -8,29 +8,28 @@ 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:
os: [ubuntu-latest, macos-latest, windows-latest]
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
with:
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
Expand All @@ -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
2 changes: 1 addition & 1 deletion 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",
Expand Down

0 comments on commit be3405d

Please sign in to comment.