Moved CI to pnpm and added lockfile update chore
This commit is contained in:
parent
e612622054
commit
96a4c759cc
2 changed files with 44 additions and 16 deletions
|
@ -20,30 +20,29 @@ jobs:
|
|||
command: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y autoconf automake g++ libtool || true
|
||||
curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@7
|
||||
pnpm config set store-dir ~/.pnpm-store
|
||||
- run:
|
||||
name: Update Version Number of App
|
||||
name: Fetch Application Version
|
||||
command: sudo chmod +x resources/version.sh && ./resources/version.sh || true
|
||||
- restore_cache:
|
||||
name: Restore Yarn Package Cache
|
||||
name: Restore cached node-modules
|
||||
keys:
|
||||
- yarn-packages-{{ checksum "cider.lock" }}
|
||||
- node-{{ checksum "pnpm-lock.yaml" }}
|
||||
- run:
|
||||
name: Clear node_airtunes2 cache
|
||||
command: sudo rm -rf ~/.cache/yarn/v6/.tmp/cf5bc2de2629636ca224995234b8eaa1 || true
|
||||
command: sudo rm -rf ~/.pnpm-store/tmp/cf5bc2de2629636ca224995234b8eaa1 || true
|
||||
- run:
|
||||
name: Install Node Dependencies
|
||||
command: yarn install --frozen-lockfile --cache-folder ~/.cache/yarn
|
||||
command: pnpm install
|
||||
- save_cache:
|
||||
name: Save Yarn Package Cache
|
||||
key: yarn-packages-{{ checksum "cider.lock" }}
|
||||
name: Cache node-modules
|
||||
key: node-{{ checksum "pnpm-lock.yaml" }}
|
||||
paths:
|
||||
- ~/.cache/yarn
|
||||
- run:
|
||||
name: Clear Yarn Cache
|
||||
command: yarn cache clean
|
||||
- ~/.pnpm-store
|
||||
- run:
|
||||
name: TypeScript Compile
|
||||
command: yarn build
|
||||
command: pnpm run build
|
||||
- persist_to_workspace:
|
||||
# Must be an absolute path, or relative path from working_directory. This is a directory on the container which is
|
||||
# taken to be the root directory of the workspace.
|
||||
|
@ -54,7 +53,6 @@ jobs:
|
|||
- node_modules
|
||||
- build
|
||||
- resources
|
||||
- yarn.lock
|
||||
- package.json
|
||||
- winget.json # winget.json is a file that is generated by the winget package manager
|
||||
- LICENSE
|
||||
|
@ -66,7 +64,7 @@ jobs:
|
|||
at: ~/Cider
|
||||
- run:
|
||||
name: Generate Builds (Linux)
|
||||
command: yarn electron-builder -l -p never
|
||||
command: npm run electron-builder -l -p never
|
||||
post-steps:
|
||||
- jira/notify
|
||||
- persist_to_workspace:
|
||||
|
@ -85,7 +83,7 @@ jobs:
|
|||
at: ~/project
|
||||
- run:
|
||||
name: Generate Builds (Windows)
|
||||
command: yarn electron-builder -w --x64 -p never
|
||||
command: npm run electron-builder -w --x64 -p never
|
||||
post-steps:
|
||||
- jira/notify
|
||||
- persist_to_workspace:
|
||||
|
@ -103,7 +101,7 @@ jobs:
|
|||
at: ~/project
|
||||
- run:
|
||||
name: Generate Builds (Winget)
|
||||
command: yarn electron-builder --win -c winget.json -p never
|
||||
command: npm run electron-builder --win -c winget.json -p never
|
||||
post-steps:
|
||||
- jira/notify
|
||||
- persist_to_workspace:
|
||||
|
|
30
.github/workflows/lockfile.yml
vendored
Normal file
30
.github/workflows/lockfile.yml
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
name: Continuous Integration (Lockfile)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
prettier:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
# Make sure the actual branch is checked out when running on pull requests
|
||||
ref: ${{ github.head_ref }}
|
||||
|
||||
- name: Update lockfile
|
||||
run: pnpm i --lockfile-only
|
||||
|
||||
- name: Commit Updated Lockfile
|
||||
uses: stefanzweifel/git-auto-commit-action@v4.14.1
|
||||
with:
|
||||
commit_message: "chore: Updated Lockfile\n [ci skip]"
|
||||
commit_user_name: "cider-chore[bot]"
|
||||
commit_user_email: "cider-chore[bot]@users.noreply.github.com"
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue