Skip to content

Commit

Permalink
ci: update actions and fix GPM release
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemorales committed Feb 2, 2024
1 parent f948a42 commit 55d2586
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 37 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
name: 📦 Install dependencies
steps:
- name: 🔑 Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 🔧 Install Bun
uses: oven-sh/setup-bun@v1
with:
version: latest
bun-version: latest

- name: ♻️ Cache node_modules
uses: actions/cache@v3
uses: actions/cache@v4
id: bun-cache
with:
path: "**/node_modules"
Expand All @@ -41,21 +41,21 @@ jobs:
needs: install-deps
steps:
- name: 🔑 Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 🔧 Install Bun
uses: oven-sh/setup-bun@v1
with:
version: latest
bun-version: latest

- name: ♻️ Restore node_modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: "**/node_modules"
key: ${{ runner.os }}-node-${{ hashFiles('**/bun.lockb') }}

- name: ♻️ Restore ESLint Cache
uses: actions/cache@v3
uses: actions/cache@v4
id: eslint-cache
with:
path: .eslintcache
Expand All @@ -74,15 +74,15 @@ jobs:
needs: install-deps
steps:
- name: 🔑 Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 🔧 Install Bun
uses: oven-sh/setup-bun@v1
with:
version: latest
bun-version: latest

- name: ♻️ Restore node_modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: "**/node_modules"
key: ${{ runner.os }}-node-${{ hashFiles('**/bun.lockb') }}
Expand All @@ -105,15 +105,15 @@ jobs:
needs: install-deps
steps:
- name: 🔑 Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 🔧 Install Bun
uses: oven-sh/setup-bun@v1
with:
version: latest
bun-version: latest

- name: ♻️ Load node_modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: "**/node_modules"
key: ${{ runner.os }}-node-${{ hashFiles('**/bun.lockb') }}
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- main
workflow_dispatch:
inputs:
forceGPR:
force_github_package_release:
description: Force GPR release
type: boolean
required: false
Expand All @@ -21,15 +21,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🔑 Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 🔧 Install Bun
uses: oven-sh/setup-bun@v1
with:
version: latest
bun-version: latest

- name: ♻️ Cache node_modules
uses: actions/cache@v3
uses: actions/cache@v4
id: bun-cache
with:
path: "**/node_modules"
Expand All @@ -46,12 +46,12 @@ jobs:
needs: install-deps
steps:
- name: 🔑 Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 🔧 Install Bun
uses: oven-sh/setup-bun@v1
with:
version: latest
bun-version: latest

- name: 📦 Install dependencies
if: steps.bun-cache.outputs.cache-hit != 'true'
Expand All @@ -68,30 +68,30 @@ jobs:

release:
name: 🚀 Release to NPM
if: github.event.inputs.forceGPR != 'true'
if: github.event.inputs.force_github_package_release != 'true'
runs-on: ubuntu-latest
needs: build
outputs:
published: ${{ steps.changesets.outputs.published }}
steps:
- name: 🔑 Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: 🔧 Install Bun
uses: oven-sh/setup-bun@v1
with:
version: latest
bun-version: latest

- name: ♻️ Load node_modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: "**/node_modules"
key: ${{ runner.os }}-node-${{ hashFiles('**/bun.lockb') }}

- name: ♻️ Load build files
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: "**/dist"
key: ${{ runner.os }}-build-${{ hashFiles('**/bun.lockb') }}
Expand Down Expand Up @@ -124,23 +124,23 @@ jobs:

gpr-release:
name: 🚀 Release to GitHub Package Manager
if: github.event.inputs.forceGPR == 'true' || needs.release.outputs.published == 'true'
if: ${{ github.event.inputs.force_github_package_release != 'true' || needs.release.outputs.published == 'true' }}
runs-on: ubuntu-latest
needs: [build, release]
permissions:
contents: read
packages: write
steps:
- name: 🔑 Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 🔧 Install Bun
uses: oven-sh/setup-bun@v1
with:
version: latest
bun-version: latest

- name: ♻️ Load node_modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: "**/node_modules"
key: ${{ runner.os }}-node-${{ hashFiles('**/bun.lockb') }}
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ jobs:
name: 📦 Install dependencies
steps:
- name: 🔑 Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 🔧 Install Bun
uses: oven-sh/setup-bun@v1
with:
version: latest
bun-version: latest

- name: ♻️ Cache node_modules
uses: actions/cache@v3
uses: actions/cache@v4
id: bun-cache
with:
path: "**/node_modules"
Expand All @@ -36,15 +36,15 @@ jobs:
needs: install-deps
steps:
- name: 🔑 Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 🔧 Install Bun
uses: oven-sh/setup-bun@v1
with:
version: latest
bun-version: latest

- name: ♻️ Load node_modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: "**/node_modules"
key: ${{ runner.os }}-node-${{ hashFiles('**/bun.lockb') }}
Expand All @@ -67,15 +67,15 @@ jobs:
needs: install-deps
steps:
- name: 🔑 Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 🔧 Install Bun
uses: oven-sh/setup-bun@v1
with:
version: latest
bun-version: latest

- name: ♻️ Load node_modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: "**/node_modules"
key: ${{ runner.os }}-node-${{ hashFiles('**/bun.lockb') }}
Expand Down

0 comments on commit 55d2586

Please sign in to comment.