Skip to content

Commit

Permalink
Upgrade GitHub action workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdinandfrank committed Feb 17, 2024
1 parent e1bc15d commit c0fb059
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 30 deletions.
19 changes: 4 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,15 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout source code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18.16'
node-version: '20'
cache: 'yarn'
registry-url: 'https://npm.pkg.github.com'

# Init cache to speed up yarn install
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: |
cd lib/functions/assets-cleanup && yarn install --frozen-lockfile && yarn install-layer && cd ../../..
Expand Down
19 changes: 4 additions & 15 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,20 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout source code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18.16'
node-version: '20'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'

- name: Create release
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true

# Init cache to speed up yarn install
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: |
cd lib/functions/assets-cleanup && yarn install --frozen-lockfile && yarn install-layer && cd ../../..
Expand Down

0 comments on commit c0fb059

Please sign in to comment.