Skip to content

Commit

Permalink
update github action workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Bates committed Mar 18, 2024
1 parent a26d798 commit 460f5ea
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 12 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
name: CI Build

on:
on:
push:
branches: main
pull_request:
pull_request:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18.x'
- name: Enable corepack
run: corepack enable
- name: Set Yarn versin
run: yarn set version stable
- name: Yarn Install
run: yarn
- name: Lint
Expand Down
29 changes: 20 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,37 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18.x'

- name: Enable corepack
run: corepack enable

- name: Set Yarn versin
run: yarn set version stable

- name: Yarn Install
run: yarn

- name: Lint
run: yarn lint
run: yarn lint:ci

- name: Jest Tests
run: yarn test:ci

- name: Typescript build
run: yarn build

- name: Set Version to Release Tag Name
run: |
yarn version --new-version ${{ github.event.release.tag_name }} --no-git-tag-version
- name: Publish to npm, publish pre-release as beta
uses: JS-DevTools/npm-publish@v1
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
tag: ${{ github.event.release.prerelease && 'beta' || 'latest' }}

0 comments on commit 460f5ea

Please sign in to comment.