Skip to content

Commit

Permalink
build: update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
stumpam authored Jan 4, 2023
1 parent 5a7cd2c commit b9ed373
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 19 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,25 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Run node
uses: actions/setup-node@v1
# Check out the repository
- uses: actions/checkout@v3
with:
node-version: "17"
- run: pnpm
- run: pnpm build ngx-cz-id --prod
fetch-depth: 0

# Install Pnpm
- name: Install pnpm
uses: pnpm/action-setup@v2.2.1
with:
version: "7.x"
# Install Node.js
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "16.x"
cache: 'pnpm'
# Install workspace dependencies
- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build ngx-cz-id --prod
60 changes: 47 additions & 13 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,61 @@ jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
# Check out the repository
- uses: actions/checkout@v3
with:
node-version: 17
registry-url: https://registry.npmjs.org/
- run: pnpm
- run: pnpm build ngx-cz-id --prod
- run: pnpm publish dist/libs/ngx-cz-id --access public
fetch-depth: 0

# Install Pnpm
- name: Install pnpm
uses: pnpm/action-setup@v2.2.1
with:
version: "7.x"
# Install Node.js
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "16.x"
registry-url: 'https://registry.npmjs.org/'
cache: 'pnpm'
# Install workspace dependencies
- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build ngx-cz-id --prod

- run: pnpm publish dist/libs/ngx-cz-id --no-git-checks
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

publish-gpr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
# Check out the repository
- uses: actions/checkout@v3
with:
node-version: 17
fetch-depth: 0

# Install Pnpm
- name: Install pnpm
uses: pnpm/action-setup@v2.2.1
with:
version: "7.x"
# Install Node.js
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "16.x"
registry-url: https://npm.pkg.github.com/
- run: pnpm
- run: pnpm build ngx-cz-id --prod
- run: pnpm publish dist/libs/ngx-cz-id
cache: 'pnpm'
# Install workspace dependencies
- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build ngx-cz-id --prod

- run: pnpm publish dist/libs/ngx-cz-id --no-git-checks
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit b9ed373

Please sign in to comment.