Skip to content

Commit a10ee6f

Browse files
ci: switch to GHA (#129)
Co-authored-by: Erick Zhao <[email protected]>
1 parent 4782b1e commit a10ee6f

File tree

5 files changed

+81
-36
lines changed

5 files changed

+81
-36
lines changed

.circleci/config.yml

-35
This file was deleted.

.github/workflows/release.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
test:
10+
uses: ./.github/workflows/test.yml
11+
12+
release:
13+
name: Release
14+
runs-on: ubuntu-latest
15+
needs: test
16+
environment: npm
17+
permissions:
18+
id-token: write # for CFA and npm provenance
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
22+
with:
23+
persist-credentials: false
24+
- name: Setup Node.js
25+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
26+
with:
27+
node-version: 20.x
28+
cache: 'yarn'
29+
- name: Install
30+
run: yarn install --frozen-lockfile
31+
- uses: continuousauth/action@4e8a2573eeb706f6d7300d6a9f3ca6322740b72d # v1.0.5
32+
with:
33+
project-id: ${{ secrets.CFA_PROJECT_ID }}
34+
secret: ${{ secrets.CFA_SECRET }}
35+
npm-token: ${{ secrets.NPM_TOKEN }}

.github/workflows/test.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
schedule:
8+
- cron: '0 22 * * 3'
9+
workflow_call:
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
test:
16+
name: Test
17+
strategy:
18+
matrix:
19+
node-version:
20+
- '22.9'
21+
- '20.11'
22+
os:
23+
- macos-latest
24+
- ubuntu-latest
25+
- windows-latest
26+
runs-on: "${{ matrix.os }}"
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30+
- name: Setup Node.js
31+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
32+
with:
33+
node-version: "${{ matrix.node-version }}"
34+
cache: 'yarn'
35+
- name: Install
36+
run: yarn install --frozen-lockfile
37+
- name: Prettier
38+
run: yarn prettier:check
39+
- name: Build
40+
run: yarn build
41+
- name: Test
42+
run: yarn test

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Electron Docs Parser
22

3-
[![CircleCI build status](https://circleci.com/gh/electron/docs-parser/tree/main.svg?style=shield)](https://circleci.com/gh/electron/docs-parser/tree/main)
3+
[![Test](https://github.com/electron/docs-parser/actions/workflows/test.yml/badge.svg)](https://github.com/electron/docs-parser/actions/workflows/test.yml)
44
[![npm version](http://img.shields.io/npm/v/@electron/docs-parser.svg)](https://npmjs.org/package/@electron/docs-parser)
55

66
> Generate a structured JSON API file from Electron's free-form documentation

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
"engines": {
1010
"node": "^20.11.0 || >= 21.2.0"
1111
},
12+
"publishConfig": {
13+
"provenance": true
14+
},
1215
"scripts": {
1316
"build": "tsc",
1417
"prepublishOnly": "npx yarn build",

0 commit comments

Comments
 (0)