Skip to content

Commit

Permalink
ci: switch to GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
dsanders11 committed Nov 13, 2024
1 parent f7615c6 commit 2ceb87e
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 51 deletions.
50 changes: 0 additions & 50 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 }}
51 changes: 51 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
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.16'
os:
- macos-latest
- ubuntu-latest
- windows-latest
runs-on: "${{ matrix.os }}"
steps:
- run: git config --global core.autocrlf input
- name: Install Rosetta
if: ${{ matrix.os == 'macos-latest' && matrix.node-version == '14.16' }}
run: /usr/sbin/softwareupdate --install-rosetta --agree-to-license
- 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'
architecture: ${{ matrix.os == 'macos-latest' && matrix.node-version == '14.16' && 'x64' || env.RUNNER_ARCH }}
- name: Install (Node.js v16+)
if : ${{ matrix.node-version != '14.16' }}
run: yarn install --frozen-lockfile
- name: Install (Node.js < v16)
if : ${{ matrix.node-version == '14.16' }}
run: yarn install --frozen-lockfile --ignore-engines
- name: Test
run: yarn test
- name: Build docs
run: yarn build:docs
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> Download Electron release artifacts
[![CircleCI](https://circleci.com/gh/electron/get.svg?style=shield)](https://circleci.com/gh/electron/get)
[![Test](https://github.com/electron/get/actions/workflows/test.yml/badge.svg)](https://github.com/electron/get/actions/workflows/test.yml)
[![NPM package](https://img.shields.io/npm/v/@electron/get)](https://npm.im/@electron/get)

## Usage
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"repository": "https://github.com/electron/get",
"author": "Samuel Attard",
"license": "MIT",
"publishConfig": {
"provenance": true
},
"scripts": {
"build": "tsc && tsc -p tsconfig.esm.json",
"build:docs": "npx typedoc",
Expand Down

0 comments on commit 2ceb87e

Please sign in to comment.