Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanb committed Jul 29, 2024
1 parent f919c84 commit 9b994ad
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 30 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/lib-ui-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ jobs:
install_workspaces: '-w packages/lib-ui'
build_run_script: 'build -w packages/lib-ui'
test_run_script: 'test -w packages/lib-ui'
secrets:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 4 additions & 2 deletions .github/workflows/lib-ui-push-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
install_command: 'npm ci'
build_command: 'npm run build -w packages/lib-ui'
test_command: 'npm run test -w packages/lib-ui'
secrets:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
version:
needs: tests
uses: ./.github/worfklows/version.yaml
Expand All @@ -29,7 +31,7 @@ jobs:
version_command: 'npm version patch packages/lib-ui'
version_workspace: 'packages/lib-ui'
secrets:
node_auth_token: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish:
needs: version
uses: ./.github/worfklows/publish.yaml
Expand All @@ -42,5 +44,5 @@ jobs:
build_command: 'npm run build -w packages/lib-ui'
publish_command: 'npm publish -w packages/lib-ui'
secrets:
node_auth_token: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

4 changes: 2 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ on:
required: false
default: 'npm publish'
secrets:
- node_auth_token
- NODE_AUTH_TOKEN

jobs:
publish:
Expand All @@ -54,4 +54,4 @@ jobs:
- run: ${{ inputs.publish_command }}
env:
# This is the write access auth token for the npm registry; often just simply secrets.GITHUB_TOKEN
NODE_AUTH_TOKEN: ${{ secrets.node_auth_token }}
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
11 changes: 5 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ on:
required: false
default: npm run test
type: string
# if using private npm access, provide npm auth token here.
# secrets:
# - node_auth_token
secrets:
- NODE_AUTH_TOKEN

jobs:
run_tests:
Expand All @@ -54,9 +53,9 @@ jobs:
scope: ${{ inputs.node_scope }}
- name: Install Dependencies
run: npm ci "${{ inputs.install_workspaces }}"
# if using private npm access, provide npm auth token here.
# env:
# NODE_AUTH_TOKEN: ${{ secrets.node_auth_token }}
env:
# This is the write access auth token for the npm registry; often just simply secrets.GITHUB_TOKEN
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
- name: Build
if: ${{ inputs.build_run_script != '' }}
run: npm run "${{ inputs.build_run_script }}"
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ on:
required: false
default: .
# if using private npm access, provide npm auth token here.
# secrets:
# - node_auth_token
secrets:
- NODE_AUTH_TOKEN

jobs:
bump_version:
Expand All @@ -47,7 +47,10 @@ jobs:
cache: ${{ inputs.node_cache }}
registry-url: ${{ inputs.node_registry_url }}
scope: ${{ inputs.node_scope }}
- run: |
- name: 'Setup version tool'
run: echo "const fs = require('node:fs'); const path = require('node:path'); function gatherVerisonAndEmit(_node, _script, workspacePath) { const projectPath = path.join(__dirname, workspacePath, 'package.json'); if (!fs.existsSync(projectPath)) return; const pkg = require(projectPath); console.log(`VER=${pkg.version}`); console.log(`PACKAGE=${pkg.name}`); } gatherVerisonAndEmit(...process.argv);" > ./npm-version-helper.cjs
- name: 'Bump version'
run: |
git config user.name github-actions
git config user.email [email protected]
git fetch
Expand All @@ -58,6 +61,5 @@ jobs:
git tag -am "$PACKAGE $VER publish." "$PACKAGE@$VER"
git push
git push --tags
# if using private npm access, provide npm auth token here.
# env:
# NODE_AUTH_TOKEN: ${{ secrets.node_auth_token }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
14 changes: 0 additions & 14 deletions npm-version-helper.cjs

This file was deleted.

0 comments on commit 9b994ad

Please sign in to comment.