Skip to content

Commit

Permalink
👷 pnpm cache and hotfix snapshot release (#10)
Browse files Browse the repository at this point in the history
* 👷  pnpm cache and hotfix snapshot release

* 👷  only .changset changes

* 💚  upgrade ttypescript@1.5.15
  • Loading branch information
JiangWeixian authored Sep 3, 2023
1 parent 23623a2 commit 3aee4d6
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 25 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,24 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install pnpm
run: npm i pnpm@7.23.0 -g
- name: Install
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install
run: |
pnpm install --frozen-lockfile=false
- name: Build
Expand Down
24 changes: 20 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,26 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: 14
- name: install pnpm
run: npm i pnpm@7.23.0 -g
- name: install dependencies
run: pnpm install --frozen-lockfile=false
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install
run: |
pnpm install --frozen-lockfile=false
- name: create and publish versions
uses: changesets/action@v1
with:
Expand Down
39 changes: 28 additions & 11 deletions .github/workflows/snapshot-release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: Release
name: Snapshot Release
on:
push:
branches:
- snapshot
- 'hotfix/**'
paths:
- '.changeset/**'
env:
CI: true
jobs:
Expand All @@ -22,17 +25,31 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: 14
- name: install pnpm
run: npm i pnpm@7.23.0 -g
- name: install dependencies
run: pnpm install --frozen-lockfile=false
- name: create and publish versions
uses: changesets/action@v1
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
version: pnpm ci:snapshot
commit: "chore: update versions"
title: "chore: update versions"
publish: pnpm ci:prerelease
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install
run: |
pnpm install --frozen-lockfile=false
- name: create and publish versions
run: |
pnpm changeset pre enter beta
pnpm ci:snapshot
pnpm ci:prerelease
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"rollup-plugin-node-externals": "5.1.2",
"ts-node": "^10.7.0",
"tslib": "2.4.0",
"ttypescript": "1.5.13",
"ttypescript": "1.5.15",
"typescript": "4.4.3",
"typescript-transform-paths": "3.3.1",
"vite": "^4.3.2",
Expand Down
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3aee4d6

Please sign in to comment.