Skip to content

Commit

Permalink
Fix GitHub actions (#71)
Browse files Browse the repository at this point in the history
* Temprary CI changes for testing

* Fix yaml syntax

* Remove gate for action

* Fix reusable action's inputs and condition

* Remove extra parens

* Fix quotes

* Remove event scope from input vars

* Align Node engine support with dependencies

* Clean up earlier CI changes

* Re-enable publish action
  • Loading branch information
spautz authored Feb 12, 2024
1 parent ff3e38d commit 220e5b7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
19 changes: 11 additions & 8 deletions .github/reusable-workflows/setup-repo/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,24 @@ description: Standardized workspace setup for package-template
inputs:
node-version:
description: NodeJS version, for actions/setup-node
type: string
required: true
use-lockfile:
description: Whether or not to honor pnpm-lock.yaml or other lockfiles
type: boolean
required: true
default: true
default: 'true'

runs:
using: composite
steps:
- uses: actions/[email protected]
if: ${{ github.event.inputs.node-version }} != "nvmrc"
if: ${{ inputs.node-version == 'nvmrc' }}
with:
node-version: ${{ github.event.inputs.node-version }}
node-version-file: .nvmrc
registry-url: 'https://registry.npmjs.org'
- uses: actions/[email protected]
if: ${{ github.event.inputs.node-version }} == "nvmrc"
if: ${{ inputs.node-version != 'nvmrc' }}
with:
node-version-file: .nvmrc
node-version: ${{ inputs.node-version }}
registry-url: 'https://registry.npmjs.org'

- uses: oven-sh/[email protected]
Expand All @@ -45,10 +43,15 @@ runs:
${{ runner.os }}-pnpm-store-
- name: Remove lockfile to loosen dependency tree
if: ${{ !github.event.inputs.use-lockfile }}
if: ${{ inputs.use-lockfile == 'false' }}
shell: bash
run: |
rm -f bun.lockb package-lock.json pnpm-lock.yaml yarn.lock
- name: Keep lockfile intact
if: ${{ inputs.use-lockfile != 'false' }}
shell: bash
run: |
echo "(not removing lockfile)"
- name: Install dependencies
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 19.x, 20.x, 21.x]
node-version: [18.x, 20.x, 21.x]

steps:
- uses: actions/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"url": "https://github.com/spautz/"
},
"engines": {
"node": "^16 || ^18 || ^19 || ^20 || ^21",
"node": "^18 || ^20 || ^21",
"pnpm": "^8"
},
"packageManager": "[email protected]",
Expand Down

0 comments on commit 220e5b7

Please sign in to comment.