Skip to content

Commit

Permalink
fix: pipelines steps
Browse files Browse the repository at this point in the history
  • Loading branch information
KarineBrandelli committed Jun 25, 2024
1 parent beeb57b commit c768910
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 10 deletions.
35 changes: 27 additions & 8 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,54 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Enable Corepack before setting up Node

- name: Enable corepack
run: corepack enable

- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
always-auth: true

- name: Install lastest Yarn version
run: yarn set version berry
- run: yarn
- run: yarn lint

- name: Install dependencies
run: yarn

- name: Run lint
run: yarn lint

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Publish new version to NPM

- name: Enable corepack
run: corepack enable

- name: Publish new version to NPM
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
always-auth: true

- name: Install lastest Yarn version
run: yarn set version berry
- run: yarn
- run: yarn build
- run: node pre-publish.js
- run: npm publish ./dist --access public

- name: Install dependencies
run: yarn

- name: Build package
run: yarn build

- name: Run pre-publish
run: node pre-publish.js

- name: Publish package on npm
run: npm publish ./dist --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
5 changes: 4 additions & 1 deletion .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}

- name: Enable corepack
run: corepack enable

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/publish-s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable

- name: Enable corepack
run: corepack enable

- uses: actions/setup-node@v4
with:
node-version: 20.x
Expand All @@ -18,11 +21,13 @@ jobs:
yarn set version berry
yarn
yarn docs:build
- name: Configure AWS credentials
uses: aws-actions/[email protected]
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_ACCESS_SECRET }}
aws-region: "us-east-1"

- name: Deploy to S3
run: aws s3 sync docs s3://amazing-react-charts.ngi.com.br --delete

0 comments on commit c768910

Please sign in to comment.