Skip to content

Commit

Permalink
ci: switch to GHA (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsanders11 authored Nov 13, 2024
1 parent 3df9e33 commit c3a04e1
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 40 deletions.
37 changes: 0 additions & 37 deletions .circleci/config.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release

on:
push:
branches:
- main

jobs:
test:
uses: ./.github/workflows/test.yml

release:
name: Release
runs-on: ubuntu-latest
needs: test
environment: npm
permissions:
id-token: write # for CFA and npm provenance
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 20.x
cache: 'yarn'
- name: Install
run: yarn install --frozen-lockfile
- uses: continuousauth/action@c32f05c950d4e6f4abd8d1d8a46269525e2dbf55 # v1.0.3
with:
project-id: ${{ secrets.CFA_PROJECT_ID }}
secret: ${{ secrets.CFA_SECRET }}
npm-token: ${{ secrets.NPM_TOKEN }}
43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Test

on:
pull_request:
branches:
- main
schedule:
- cron: '0 22 * * 3'
workflow_call:

permissions:
contents: read

jobs:
test:
name: Test
strategy:
matrix:
node-version:
- '20.10'
- '18.18'
- '16.20'
- '14.21'
os:
- macos-latest
- ubuntu-latest
- windows-latest
exclude:
- os: macos-latest
node-version: '14.21'
runs-on: "${{ matrix.os }}"
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: "${{ matrix.node-version }}"
cache: 'yarn'
- name: Install
run: yarn install --frozen-lockfile
- name: Test
run: yarn test
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ BREAKING CHANGE: This removes support for Node 0.10 and 0.12.

Here are some things to keep in mind as you file pull requests to fix bugs, add new features, etc.:

- CircleCI is used to make sure that the project builds packages as expected on the supported platforms, using supported Node.js versions.
- GitHub Actions is used to make sure that the project builds packages as expected on the supported platforms, using supported Node.js versions.
- Unless it's impractical, please write tests for your changes. This will help us so that we can spot regressions much easier.
- Squashing commits during discussion of the pull request is almost always unnecessary, and makes it more difficult for both the submitters and reviewers to understand what changed in between comments. However, rebasing is encouraged when practical, particularly when there's a merge conflict.
- If you are continuing the work of another person's PR and need to rebase/squash, please retain the attribution of the original author(s) and continue the work in subsequent commits.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# Node.js ABI

[![Build Status](https://circleci.com/gh/electron/node-abi/tree/main.svg?style=shield)](https://circleci.com/gh/electron/node-abi/tree/main)
[![Build Status](https://github.com/electron/node-abi/actions/workflows/test.yml/badge.svg)](https://github.com/electron/node-abi/actions/workflows/test.yml)
[![Auto-update ABI JSON file](https://github.com/electron/node-abi/actions/workflows/update-abi.yml/badge.svg)](https://github.com/electron/node-abi/actions/workflows/update-abi.yml)
[![Snyk badge](https://snyk.io/test/github/electron/node-abi/badge.svg)](https://snyk.io/test/github/electron/node-abi)
[![npm version](http://img.shields.io/npm/v/node-abi.svg)](https://npmjs.org/package/node-abi)

Get the Node ABI (application binary interface) for a given target and runtime, and vice versa.

## Installation
```

```shell
npm install node-abi
```

## Usage

```javascript
const nodeAbi = require('node-abi')

Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,8 @@
},
"engines": {
"node": ">=10"
},
"publishConfig": {
"provenance": true
}
}

0 comments on commit c3a04e1

Please sign in to comment.