Skip to content

Commit ac22b73

Browse files
sarahdayanclaude
andauthored
chore: migrate from CircleCI to GitHub Actions (#1031)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 52397f3 commit ac22b73

5 files changed

Lines changed: 157 additions & 123 deletions

File tree

.circleci/config.yml

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

.github/workflows/ci.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
pull_request:
8+
branches:
9+
- '**'
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: '20'
20+
21+
- name: Cache node_modules
22+
id: cache-modules
23+
uses: actions/cache@v4
24+
with:
25+
path: '**/node_modules'
26+
key: node-modules-${{ hashFiles('**/yarn.lock') }}
27+
28+
- name: Install dependencies
29+
run: yarn install --frozen-lockfile
30+
31+
- name: Lint
32+
run: yarn lint
33+
34+
test:
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v4
38+
39+
- uses: actions/setup-node@v4
40+
with:
41+
node-version: '20'
42+
43+
- name: Cache node_modules
44+
id: cache-modules
45+
uses: actions/cache@v4
46+
with:
47+
path: '**/node_modules'
48+
key: node-modules-${{ hashFiles('**/yarn.lock') }}
49+
50+
- name: Install dependencies
51+
run: yarn install --frozen-lockfile
52+
53+
- name: Unit Tests
54+
run: yarn test:ci
55+
56+
release:
57+
needs: [lint, test]
58+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
59+
runs-on: ubuntu-latest
60+
steps:
61+
- uses: actions/checkout@v4
62+
with:
63+
fetch-depth: 0
64+
65+
- uses: actions/setup-node@v4
66+
with:
67+
node-version: '20'
68+
69+
- name: Cache node_modules
70+
id: cache-modules
71+
uses: actions/cache@v4
72+
with:
73+
path: '**/node_modules'
74+
key: node-modules-${{ hashFiles('**/yarn.lock') }}
75+
76+
- name: Install dependencies
77+
run: yarn install --frozen-lockfile
78+
79+
- name: Configure git
80+
run: |
81+
git config --global user.email "instantsearch-bot@algolia.com"
82+
git config --global user.name "Algolia"
83+
84+
- name: Trigger Ship.js release
85+
run: yarn shipjs trigger
86+
env:
87+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
88+
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/gh-pages.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: '20'
17+
cache: 'yarn'
18+
19+
- name: Install dependencies
20+
run: yarn install
21+
22+
- name: Configure git
23+
run: |
24+
git config --global user.email "instantsearch-bot@algolia.com"
25+
git config --global user.name "Algolia"
26+
27+
- name: Deploy to GitHub Pages
28+
run: yarn workspace website deploy:gh
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Prepare Release
2+
3+
on:
4+
schedule:
5+
# Every Tuesday at 09:00 UTC
6+
- cron: '0 9 * * 2'
7+
workflow_dispatch:
8+
9+
jobs:
10+
prepare:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: '20'
20+
21+
- name: Cache node_modules
22+
uses: actions/cache@v4
23+
with:
24+
path: '**/node_modules'
25+
key: node-modules-${{ hashFiles('**/yarn.lock') }}
26+
27+
- name: Install dependencies
28+
run: yarn install --frozen-lockfile
29+
30+
- name: Configure git
31+
run: |
32+
git config --global user.email "instantsearch-bot@algolia.com"
33+
git config --global user.name "Algolia"
34+
35+
- name: Prepare release
36+
run: yarn run release --yes --no-browse
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

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

33
<p align="center">
44
<a href="http://npmjs.com/package/shipjs"><img alt="npm" src="https://img.shields.io/npm/v/shipjs"></a>
5-
<a href="https://circleci.com/gh/algolia/shipjs"><img alt="CircleCI" src="https://img.shields.io/circleci/build/gh/algolia/shipjs"></a>
5+
<a href="https://github.com/algolia/shipjs/actions/workflows/ci.yml"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/algolia/shipjs/ci.yml?branch=main"></a>
66
<a href="https://github.com/algolia/shipjs/blob/master/LICENSE"><img alt="NPM" src="https://img.shields.io/npm/l/shipjs"></a>
77
<a href="https://github.com/algolia/shipjs#contributors-"><img alt="All Contributors" src="https://img.shields.io/badge/all_contributors-14-orange.svg"></a>
88
<a href="https://join.slack.com/t/shipjs/shared_invite/enQtODc3OTc3NjQ0NDg3LTU3ZDgyMzlkNzY2YTMxMGQ1MzE3OGMzZjMzYjU5Y2NmZDQ5Mzk1ZWUxZjk3NWFjMDIwYmI0ZGUyY2E2YTZkYzk"><img alt="Chat on Slack" src="https://img.shields.io/badge/chat-on%20Slack-orange"></a>

0 commit comments

Comments
 (0)