Skip to content

Commit

Permalink
update flows
Browse files Browse the repository at this point in the history
  • Loading branch information
renanrodrigueszup committed Jul 4, 2024
1 parent 8e65e54 commit 0642982
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 5 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/check-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,11 @@ on: pull_request

jobs:
check-branch:
uses: stack-spot/portal-workspace/.github/workflows/check-branch.yml@main
runs-on:
- engineering-runners-dev
steps:
- uses: actions/checkout@v4
- run: node -v
- run: sudo corepack enable
- run: pnpm install
- run: pnpm check-branch
24 changes: 22 additions & 2 deletions .github/workflows/publish-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,25 @@ name: publish-package

jobs:
publish-package:
uses: stack-spot/portal-workspace/.github/workflows/publish-npm.yml@main
secrets: inherit
runs-on: engineering-runners-prd
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: node -v
- run: sudo corepack enable
- run: pnpm install
- run: pnpm build
- id: get-package
run: |
package=$(echo ${{github.ref_name}} | cut -d'@' -f1)
dirname=$(find . -path ./node_modules -prune -o -name 'package.json' -exec grep -q -i "\"name\": \"@stack-spot/${package}\"" {} \; -print | rev | cut -d'/' -f2 | rev)
echo "dirname=$dirname" >> "$GITHUB_OUTPUT"
- run: |
cd packages/${{steps.get-package.outputs.dirname}}
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
10 changes: 8 additions & 2 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,11 @@ name: release-please

jobs:
release-please:
uses: stack-spot/portal-workspace/.github/workflows/release-please.yml@main
secrets: inherit
runs-on: engineering-runners-prd
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.GIT_ORG_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json

0 comments on commit 0642982

Please sign in to comment.