Skip to content

Commit

Permalink
chore(CI): move to modern github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mdornseif committed Feb 16, 2024
1 parent 3a22d77 commit 85a071b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6,108 deletions.
39 changes: 22 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,63 +2,63 @@ name: Test, Build, and release
on:
push:
branches:
- master
- main
jobs:
test:
name: Lint and test on Node ${{ matrix.node }} and ${{ matrix.os }}
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}

runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['16.x', '18.x']
os:
node: ['18.x', '20.x']
os:
- ubuntu-latest
# - windows-latest
# - macOS-latest

steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'npm'

- name: Install dependencies 📦
# run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.NODE_AUTH_TOKEN }}" >> ~/.npmrc
run: npm install
run: npm install

# - name: Lint
# run: yarn lint
- name: Lint 🔍
run: npm run lint

# - name: Test
# run: yarn test --ci --coverage --maxWorkers=2
- name: Test 🧪
run: npm run test --ci --coverage --maxWorkers=2

- name: Build 🏗
# run: yarn prepare
run: npm run build


release:
name: Release
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'npm'
registry-url: https://npm.pkg.github.com
always-auth: true
scope: '@hudora'

- name: Install dependencies 📦
# run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.NODE_AUTH_TOKEN }}" >> ~/.npmrc
run: npm install
Expand All @@ -75,6 +75,11 @@ jobs:
run: npx semantic-release

# - name: Deploy storybook to GitHub Pages
# run: yarn run storybook-deploy --ci
# run: npm run storybook-deploy --ci
# env:
# GH_TOKEN: ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}

# - name: Deploy documentation to GitHub Pages
# run: yarn run doc:build ; yarn run doc:publish
# env:
# GH_TOKEN: ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}
# GH_TOKEN: ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit 85a071b

Please sign in to comment.