Skip to content

Commit

Permalink
Merge pull request #161 from bluecadet/fix/ci-workflow
Browse files Browse the repository at this point in the history
update and tweak actions
  • Loading branch information
claytercek authored Oct 14, 2024
2 parents afc809f + 63e22a7 commit 93d8033
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 21 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@ name: Main

on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- develop
- main
push:
branches:
- develop
- main
merge_group:

concurrency:
Expand All @@ -24,13 +21,14 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version-file: 'package.json'
cache: 'npm'

- name: Install Dependencies
run: npm install
run: npm ci

- name: Run eslint
run: npm run lint
Expand Down
20 changes: 6 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@ jobs:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Node.js 18.x
uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x

node-version-file: 'package.json'
cache: 'npm'

- name: Install Dependencies
run: npm install
run: npm ci

- name: Create Release Pull Request or Publish to npm
id: changesets
Expand All @@ -31,9 +29,3 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Update main branch if a publish happens
if: steps.changesets.outputs.published == 'true'
run: |
git fetch --unshallow
git push origin develop:main

0 comments on commit 93d8033

Please sign in to comment.