Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Techassi committed Oct 26, 2023
1 parent ba802d8 commit 75c0ddd
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 13 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/publish-dry-run.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish Package Dry Run
on:
pull_request:
workflow_dispatch:

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v2.4.0
with:
version: latest
- name: Install nodejs ${{ matrix.node-version }}
uses: actions/setup-node@v3.8.1
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint library
run: pnpm -r lint
- name: Build library
if: ${{ success() }}
run: pnpm -r build
- name: Publish package
run: pnpm -r publish --access public --no-git-checks --dry-run
10 changes: 5 additions & 5 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v2.4.0
with:
version: latest
- name: Install nodejs ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v3.8.1
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/
cache: "pnpm"
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Lint library
run: pnpm -r lint
- name: Build library
Expand All @@ -36,4 +36,4 @@ jobs:
- name: Create release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
16 changes: 8 additions & 8 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v2.4.0
with:
version: latest
- name: Install nodejs ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v3.8.1
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/
cache: "pnpm"
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Lint changes
run: pnpm -r lint

Expand All @@ -43,16 +43,16 @@ jobs:
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v2.4.0
with:
version: latest
- name: Install nodejs ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v3.8.1
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/
cache: "pnpm"
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Build changes
run: pnpm -r build
run: pnpm -r build
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ node_modules/
.eslintignore
.eslintrc
vite.config.js
vite.config.ts
tsconfig.json

# local env files
Expand Down

0 comments on commit 75c0ddd

Please sign in to comment.