Skip to content

Commit

Permalink
Update github-ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rubiin authored Oct 28, 2024
1 parent 1e368ee commit 189847a
Showing 1 changed file with 21 additions and 52 deletions.
73 changes: 21 additions & 52 deletions .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- master

jobs:
lint:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -29,59 +29,28 @@ jobs:
- name: Install
run: nci

- name: Lint
run: nr lint
- name: Build
run: nr build

typecheck:
release:
if: ${{ github.ref == 'refs/heads/master' }}
needs:
- build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v3

- name: Set node
uses: actions/setup-node@v4
- uses: google-github-actions/release-please-action@v4
id: release
with:
node-version: lts/*

- name: Setup
run: npm i -g @antfu/ni

- name: Install
run: nci

- name: Typecheck
run: nr typecheck

test:
runs-on: ${{ matrix.os }}

strategy:
matrix:
node: [lts/*]
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false

steps:
release-type: node
package-name: ultimate-nest
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v3

- name: Set node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: Setup
run: npm i -g @antfu/ni

- name: Install
run: nci

- name: Build
run: nr build

- name: Test
run: nr test
- name: tag stable versions
if: ${{ steps.release.outputs.release_created }}
run: |
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
git remote add gh-token "https://${{ secrets.TOKEN_GITHUB }}@github.com/google-github-actions/release-please-action.git"
git tag -d stable || true
git push origin :stable || true
git tag -a stable -m "Last Stable Release"
git push origin stable

0 comments on commit 189847a

Please sign in to comment.