Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,31 @@ on:
jobs:
ci:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
pull-requests: write
if: |
github.event.pull_request.head.repo.full_name == github.repository ||
(github.ref == 'refs/heads/master' && github.event_name == 'push')
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3.0.0
with:
token: '${{ secrets.BOT_TOKEN }}'
token: '${{ secrets.GITHUB_TOKEN }}'
fetch-depth: 0

- name: Setup Node.js and Authenticate with npm
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only thing I'm not sure about is the version of npm that you will get with this, as it requires > 11.5.1


- name: Update npm to the latest version
run: npm install -g npm@latest

- name: Build packages
uses: ./.github/actions/build

- name: prepare npm access
run: echo '//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}' >> ~/.npmrc
# https://github.com/lerna/lerna/issues/2788 --no-verify-access
# https://github.com/lerna/lerna/issues/1893 --preid ${{ github.sha }}
- name: prerelease
if: |
!contains(github.head_ref, 'dependabot') &&
Expand All @@ -49,9 +59,9 @@ jobs:
github.event_name == 'push' &&
github.ref == 'refs/heads/master'
env:
GH_TOKEN: '${{ secrets.BOT_TOKEN }}'
GH_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: |
git config user.name "GitHub Actions Build"
git config user.email "[email protected]"
yarn release:check
yarn release:latest --yes --no-verify-access
yarn release:latest --yes --no-verify-access --npm-publish-args="--provenance"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"commit": "git-cz",
"release:check": "lerna changed",
"release:latest": "lerna publish --yes --conventional-commits --create-release github --message 'chore(release): publish [ci skip]'",
"release:canary": "lerna publish --canary --ignore-scripts",
"release:canary": "NPM_CONFIG_PROVENANCE=true lerna publish --canary --ignore-scripts",
"prepare": "husky install"
},
"workspaces": [
Expand Down
Loading