-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: improve release workflow #767
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ jobs: | |
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
registry-url: 'https://registry.npmjs.org' | ||
# Bootstrap lerna for building app before publishing | ||
- name: restore lerna | ||
uses: actions/cache@v3 | ||
|
@@ -30,17 +31,14 @@ jobs: | |
node_modules | ||
*/*/node_modules | ||
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-v2 | ||
- run: npm install -g npm@9 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
- run: yarn install --frozen-lockfile | ||
- run: npx lerna bootstrap -- --frozen-lockfile | ||
- run: yarn lerna run --scope @openameba/spindle-hooks build | ||
- name: Set git user | ||
run: | | ||
git config --global user.email "<>" | ||
git config --global user.name "openameba" | ||
- name: Log in to npm | ||
run: | | ||
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | ||
npm whoami | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' | ||
Comment on lines
+40
to
+41
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. コミットしたユーザーがGitHub Actionsのように表示されます。 |
||
- name: Extract branch from git ref | ||
run: | | ||
echo "::set-output name=name::${GITHUB_REF#refs/*/}" | ||
|
@@ -51,6 +49,8 @@ jobs: | |
run: yarn lerna publish ${{ steps.extract_branch.outputs.version }} --conventional-commits --create-release github --yes --no-private | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
NPM_CONFIG_PROVENANCE: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. npm から直接公開するのではないため |
||
- name: Create Pull Request | ||
run: > | ||
curl | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.npmrc
のセットアップをsetup-nodeにしてもらいます。