Skip to content

Commit

Permalink
ci: make single flow
Browse files Browse the repository at this point in the history
  • Loading branch information
vladkens committed Oct 12, 2024
1 parent ce1c51b commit 2630388
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 54 deletions.
1 change: 0 additions & 1 deletion .github/CODEOWNERS

This file was deleted.

1 change: 0 additions & 1 deletion .github/funding.yml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: ci

on:
push:
pull_request:

jobs:
test:
runs-on: ubuntu-latest
name: node-${{ matrix.node-version }}
strategy:
matrix:
node-version: [18, 20, 22]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"

- run: yarn install --frozen-lockfile
- run: yarn format-check
- run: yarn test-cov
- run: yarn build

release:
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
needs: test
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
registry-url: "https://registry.npmjs.org"

- run: yarn install --frozen-lockfile
- run: yarn test
- run: yarn build

- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Create Github Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23 changes: 0 additions & 23 deletions .github/workflows/publish.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/test.yml

This file was deleted.

0 comments on commit 2630388

Please sign in to comment.