Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: switch to GHA #1784

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 0 additions & 72 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@4e8a2573eeb706f6d7300d6a9f3ca6322740b72d # v1.0.5
with:
project-id: ${{ secrets.CFA_PROJECT_ID }}
secret: ${{ secrets.CFA_SECRET }}
npm-token: ${{ secrets.NPM_TOKEN }}
62 changes: 62 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
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:
- '22.9'
- '20.2'
- '18.14'
- '16.13'
os:
- macos-latest
- ubuntu-latest
- windows-latest
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: Setup CI Environment
run: test/ci/before_install.sh
- name: Install
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: Electron Cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ~/.cache/electron
key: v1-electron-cache-${{ matrix.os }}
- name: Download Electron binaries
run: node test/ci/_before_script.js
- name: Lint
run: yarn run lint
- name: Test & Report Coverage
run: |
yarn run coverage
yarn run coverage:report
- name: Upload coverage to Codecov
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2
with:
files: ./coverage.lcov
token: ${{ secrets.CODECOV_TOKEN }}
- name: Build Docs
run: yarn run docs:build
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ typedoc
npm-debug.log
dist/
src/targets.js
coverage.lcov
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Package your [Electron](https://electronjs.org) app into OS-specific bundles (`.app`, `.exe`, etc.) via JavaScript or the command line.

[![CircleCI Build Status](https://circleci.com/gh/electron/packager/tree/main.svg?style=svg)](https://circleci.com/gh/electron/packager/tree/main)
[![Test](https://github.com/electron/packager/actions/workflows/test.yml/badge.svg)](https://github.com/electron/packager/actions/workflows/test.yml)
[![electron-nightly Canary](https://github.com/electron/packager/actions/workflows/canary.yml/badge.svg)](https://github.com/electron/packager/actions/workflows/canary.yml)
[![Coverage Status](https://codecov.io/gh/electron/packager/branch/main/graph/badge.svg)](https://codecov.io/gh/electron/packager)
[![npm](https://img.shields.io/npm/v/@electron/packager.svg?style=flat)](https://npm.im/@electron/packager)
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
"@typescript-eslint/parser": "^6.9.1",
"ava": "^3.10.1",
"buffer-equal": "^1.0.0",
"codecov": "^3.0.0",
"copyfiles": "^2.4.1",
"eslint": "^8.52.0",
"eslint-plugin-ava": "^14.0.0",
Expand All @@ -75,12 +74,15 @@
"engines": {
"node": ">= 16.13.0"
},
"publishConfig": {
"provenance": true
},
"scripts": {
"ava": "ava test/index.js",
"build": "tsc",
"postbuild": "copyfiles -f ./temp/targets.js ./src",
"codecov": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
"coverage": "nyc ava test/index.js",
"coverage:report": "nyc report --reporter=text-lcov > coverage.lcov",
"docs:build": "node test/ci/build_docs.js",
"lint": "eslint .",
"prepublish": "npm run build",
Expand Down
Loading
Loading