Skip to content

Commit

Permalink
Merge pull request #335 from Enterwell/stage
Browse files Browse the repository at this point in the history
Stage
  • Loading branch information
AleksandarDev authored Feb 6, 2024
2 parents 48f64e0 + b798467 commit 8fa3062
Show file tree
Hide file tree
Showing 6 changed files with 180 additions and 159 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/npm-publish-reusable.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Publish npm package

env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}

on:
workflow_call:
inputs:
Expand All @@ -15,27 +18,41 @@ jobs:
publish:
name: Publish ${{ inputs.name }}
runs-on: ubuntu-latest

steps:
# Ensuring that only one PR-environment-creation per branch will run at a time
- name: Mutex setup
uses: ben-z/[email protected]
with:
branch: "mutex/${{ github.event.workflow_run.head_branch }}-publish"

# Default the GK_TOKEN to GITHUB_TOKEN if not present
- name: Look for GH_TOKEN
if: env.GH_TOKEN == ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: echo "GH_TOKEN=${GITHUB_TOKEN}" >> $GITHUB_ENV

- uses: actions/checkout@v4
with:
ref: main
token: ${{ env.GH_TOKEN }}

- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: 'latest'

- uses: actions/setup-node@v4
with:
node-version: "18.x"
cache: "pnpm"

- name: Setup npmrc
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Changelog
id: version-bump
uses: Enterwell/ChangelogManager-GitHub-Action@v3
Expand All @@ -44,13 +61,16 @@ jobs:
should-bump-version: true
changes-location: ./packages/${{ inputs.name }}/changes
path-to-project-file: ./packages/${{ inputs.name }}/package.json

- name: Commit changelog changes
uses: EndBug/[email protected]
with:
message: "[skip ci] [version-bump] Automated commit for version ${{ steps.version-bump.outputs.bumped-semantic-version }}"

- run: pnpm i --frozen-lockfile --filter=${{ inputs.name }}...
- run: pnpm build --filter=${{ inputs.name }}...
- run: pnpm publish --access public --filter=${{ inputs.name }} --no-git-checks

- name: Git tags update
run: |
git config user.name github-actions
Expand All @@ -61,6 +81,7 @@ jobs:
git tag -f "${{ inputs.name }}/v${{ steps.version-bump.outputs.bumped-major-part }}.${{ steps.version-bump.outputs.bumped-minor-part }}" "${{ inputs.name }}/v${{ steps.version-bump.outputs.bumped-semantic-version }}"

git push -f --tags

- name: Create GitHub release
run: gh release create "${{ inputs.name }}/v${{ steps.version-bump.outputs.bumped-semantic-version }}" -n "${{ steps.version-bump.outputs.new-changes }}"
env:
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
},
"devDependencies": {
"@types/node": "18.19.10",
"@types/react": "18.2.53",
"@types/react": "18.2.55",
"@types/react-dom": "18.2.18",
"autoprefixer": "10.4.17",
"postcss": "8.4.33",
"postcss": "8.4.34",
"tailwindcss": "3.4.1",
"typescript": "5.3.3",
"unist-builder": "4.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"lint": "eslint ."
},
"devDependencies": {
"@microsoft/api-extractor": "7.39.4",
"@microsoft/api-extractor": "7.39.5",
"@types/node": "18.19.10",
"@types/react": "18.2.53",
"@types/react": "18.2.55",
"@types/react-dom": "18.2.18",
"eslint-config-custom": "workspace:*",
"react": "18.2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-mui-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
"devDependencies": {
"@enterwell/react-hooks": "workspace:*",
"@enterwell/react-ui": "workspace:*",
"@microsoft/api-extractor": "7.39.4",
"@microsoft/api-extractor": "7.39.5",
"@mui/material": "5.15.7",
"@mui/x-data-grid-pro": "6.19.3",
"@types/node": "18.19.10",
"@types/react": "18.2.53",
"@types/react": "18.2.55",
"@types/react-dom": "18.2.18",
"date-fns": "2.30.0",
"eslint-config-custom": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
"@emotion/react": "11.11.3",
"@emotion/styled": "11.11.0",
"@enterwell/react-hooks": "workspace:*",
"@microsoft/api-extractor": "7.39.4",
"@microsoft/api-extractor": "7.39.5",
"@mui/icons-material": "5.15.7",
"@mui/material": "5.15.7",
"@mui/system": "5.15.7",
"@mui/x-date-pickers-pro": "5.0.20",
"@mui/x-date-pickers": "5.0.20",
"@types/node": "18.19.10",
"@types/react": "18.2.53",
"@types/react": "18.2.55",
"@types/react-dom": "18.2.18",
"date-fns": "2.30.0",
"eslint-config-custom": "workspace:*",
Expand Down
Loading

0 comments on commit 8fa3062

Please sign in to comment.