Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> "$GITHUB_OUTPUT"
run: echo "dir=$(corepack yarn config get cacheFolder)" >> "$GITHUB_OUTPUT"

- name: Cache Yarn packages
uses: actions/cache@v4
Expand All @@ -40,13 +40,13 @@ jobs:
${{ runner.os }}-yarn-

- name: Install dependencies
run: yarn install --immutable
run: corepack yarn install --immutable

- name: Lint
run: yarn lint
run: corepack yarn lint

- name: Check formatting
run: yarn prettier-check
run: corepack yarn prettier-check

test:
name: Test
Expand All @@ -65,7 +65,7 @@ jobs:

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> "$GITHUB_OUTPUT"
run: echo "dir=$(corepack yarn config get cacheFolder)" >> "$GITHUB_OUTPUT"

- name: Cache Yarn packages
uses: actions/cache@v4
Expand All @@ -76,10 +76,10 @@ jobs:
${{ runner.os }}-yarn-

- name: Install dependencies
run: yarn install --immutable
run: corepack yarn install --immutable

- name: Run tests
run: yarn test
run: corepack yarn test

commitlint:
name: Commitlint
Expand All @@ -100,7 +100,7 @@ jobs:

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> "$GITHUB_OUTPUT"
run: echo "dir=$(corepack yarn config get cacheFolder)" >> "$GITHUB_OUTPUT"

- name: Cache Yarn packages
uses: actions/cache@v4
Expand All @@ -111,10 +111,10 @@ jobs:
${{ runner.os }}-yarn-

- name: Install dependencies
run: yarn install --immutable
run: corepack yarn install --immutable

- name: Fetch main for commitlint
run: git fetch origin main --depth=1

- name: Run commitlint
run: yarn commitlint --from origin/main
run: corepack yarn commitlint --from origin/main
21 changes: 12 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,18 @@ jobs:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18'
node-version-file: .tool-versions

- name: Enable Corepack
run: corepack enable

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
run: echo "dir=$(corepack yarn config get cacheFolder)" >> "$GITHUB_OUTPUT"

- uses: actions/cache@v3
- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
Expand All @@ -30,14 +33,14 @@ jobs:
${{ runner.os }}-yarn-

- name: Install dependencies
run: yarn install --frozen-lock-file --prefer-offline
run: corepack yarn install --immutable

- name: Get version from package.json before release step
id: initversion
run: echo "::set-output name=version::$(npm run get-version --silent)"
run: echo "version=$(npm run get-version --silent)" >> "$GITHUB_OUTPUT"

- name: Build NPM package
run: yarn build
run: corepack yarn build

- name: Release to NPM
id: release
Expand All @@ -48,11 +51,11 @@ jobs:
GIT_AUTHOR_EMAIL: duffel-bot-read-write@duffel.com
GIT_COMMITTER_NAME: duffel-bot
GIT_COMMITTER_EMAIL: duffel-bot-read-write@duffel.com
run: yarn release
run: corepack yarn release

- name: Get version from package.json after release step
id: extractver
run: echo "::set-output name=extractver::$(npm run get-version --silent)"
run: echo "extractver=$(npm run get-version --silent)" >> "$GITHUB_OUTPUT"

- name: Check if package versions are different
run: |
Expand Down
Loading