Skip to content

Commit

Permalink
Merge pull request #2061 from mainmatter/chore-use-volta-on-ci
Browse files Browse the repository at this point in the history
chore(ci): use volta-cli github action for node and pnpm setup
  • Loading branch information
BobrImperator authored Oct 8, 2023
2 parents 022aeae + 4fb2a1d commit 1d8b53b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 37 deletions.
47 changes: 22 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,22 @@ on:
- cron: '0 3 * * *' # daily, at 3am

env:
PNPM_VERSION: 8.8.0
VOLTA_FEATURE_PNPM: 1

jobs:
docs:
name: API docs
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4.1.0
- uses: pnpm/action-setup@v2.4.0
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- uses: volta-cli/action@d253558a6e356722728a10e9a469190de21a83ef # v4
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
with:
version: ${{ env.PNPM_VERSION }}

- uses: actions/setup-node@v3.8.1
with:
node-version: 18.17
cache: pnpm
path: "**/node_modules"
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- run: pnpm install
- run: pnpm run docs
Expand All @@ -39,15 +38,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4.1.0
- uses: pnpm/action-setup@v2.4.0
with:
version: ${{ env.PNPM_VERSION }}

- uses: actions/setup-node@v3.8.1
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- uses: volta-cli/action@d253558a6e356722728a10e9a469190de21a83ef # v4
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
with:
node-version: 18.17
cache: pnpm
path: "**/node_modules"
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- run: pnpm install
- run: pnpm build
Expand All @@ -67,15 +65,14 @@ jobs:
- ember-lts-4.12

steps:
- uses: actions/checkout@v4.1.0
- uses: pnpm/action-setup@v2.4.0
with:
version: ${{ env.PNPM_VERSION }}

- uses: actions/setup-node@v3.8.1
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- uses: volta-cli/action@d253558a6e356722728a10e9a469190de21a83ef # v4
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
with:
node-version: 18.17
cache: pnpm
path: "**/node_modules"
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- run: pnpm install
- run: pnpm build
Expand Down
21 changes: 9 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,27 @@ on:
- 'v*'

env:
PNPM_VERSION: 8.8.0
VOLTA_FEATURE_PNPM: 1

jobs:
release:
name: release
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4.1.0
- uses: pnpm/action-setup@v2.4.0
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- uses: volta-cli/action@d253558a6e356722728a10e9a469190de21a83ef # v4
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
with:
version: ${{ env.PNPM_VERSION }}

- uses: actions/setup-node@v3.8.1
with:
node-version: 18.17
registry-url: 'https://registry.npmjs.org'
cache: pnpm

path: "**/node_modules"
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- run: pnpm install
- run: pnpm build

- name: auto-dist-tag
run: npx auto-dist-tag@1 --write
run: pnpm dlx auto-dist-tag@1 --write
working-directory: packages/qunit-dom

- run: npm publish
Expand Down

0 comments on commit 1d8b53b

Please sign in to comment.