Skip to content

Commit caa0567

Browse files
authored
ci: switch to GHA (#115)
1 parent 7f59407 commit caa0567

6 files changed

Lines changed: 84 additions & 37 deletions

File tree

.circleci/config.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
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

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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+
- '20.5'
21+
- '18.17'
22+
- '16.20'
23+
runs-on: macos-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27+
- name: Setup Node.js
28+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
29+
with:
30+
node-version: "${{ matrix.node-version }}"
31+
cache: 'yarn'
32+
- name: Install (Node.js v18+)
33+
if : ${{ matrix.node-version != '16.20' }}
34+
run: yarn install --frozen-lockfile
35+
- name: Install (Node.js < v18)
36+
if : ${{ matrix.node-version == '16.20' }}
37+
run: yarn install --frozen-lockfile --ignore-engines
38+
- name: Build
39+
run: yarn build
40+
- name: Lint
41+
run: yarn lint
42+
- name: Test
43+
run: yarn test

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> Create universal macOS Electron applications
44
5-
[![CircleCI](https://circleci.com/gh/electron/universal/tree/main.svg?style=shield)](https://circleci.com/gh/electron/universal)
5+
[![Test](https://github.com/electron/universal/actions/workflows/test.yml/badge.svg)](https://github.com/electron/universal/actions/workflows/test.yml)
66
[![NPM package](https://img.shields.io/npm/v/@electron/universal)](https://npm.im/@electron/universal)
77

88
## Usage

jest.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ module.exports = {
1010
}
1111
]
1212
},
13-
globalSetup: './jest.setup.ts'
13+
globalSetup: './jest.setup.ts',
14+
testTimeout: 10000,
1415
};

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
"README.md"
2525
],
2626
"author": "Samuel Attard",
27+
"publishConfig": {
28+
"provenance": true
29+
},
2730
"scripts": {
2831
"build": "tsc -p tsconfig.cjs.json && tsc -p tsconfig.esm.json && tsc -p tsconfig.entry-asar.json",
2932
"build:docs": "npx typedoc",

0 commit comments

Comments
 (0)