-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: move npm publish to semantic release (#27143)
- Loading branch information
Showing
5 changed files
with
16 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,10 +18,7 @@ on: | |
required: false | ||
|
||
env: | ||
NODE_VERSION: 18 | ||
GIT_SHA: ${{ github.event.client_payload.sha }} | ||
NPM_VERSION: ${{ github.event.client_payload.version }} | ||
NPM_TAG: ${{ github.event.client_payload.tag }} | ||
RENOVATE_VERSION: ${{ github.event.client_payload.version }} | ||
BUILDKIT_PROGRESS: plain | ||
BUILDX_NO_DEFAULT_LOAD: 1 | ||
|
@@ -46,68 +43,10 @@ jobs: | |
with: | ||
branch: mutex-rel | ||
|
||
release-npm: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- mutex | ||
|
||
steps: | ||
- name: Prepare env | ||
run: | | ||
if [[ "${{github.event_name}}" == "workflow_dispatch" ]]; then | ||
echo "GIT_SHA=${{ github.event.inputs.sha }}" >> "$GITHUB_ENV" | ||
echo "NPM_VERSION=${{ github.event.inputs.version }}" >> "$GITHUB_ENV" | ||
echo "NPM_TAG=${{ github.event.inputs.tag }}" >> "$GITHUB_ENV" | ||
fi | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
ref: ${{ env.GIT_SHA }} | ||
show-progress: false | ||
|
||
- name: Enable corepack | ||
shell: bash | ||
run: corepack enable | ||
|
||
- name: Set up Node.js ${{ env.NODE_VERSION }} | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
cache: pnpm | ||
|
||
- name: Init platform | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.symlinks true | ||
git config --global user.email '[email protected]' | ||
git config --global user.name 'Renovate Bot' | ||
- name: Installing dependencies | ||
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0 | ||
with: | ||
timeout_minutes: 10 | ||
max_attempts: 3 | ||
command: pnpm install --frozen-lockfile | ||
|
||
- name: Build ${{ env.NPM_VERSION }} | ||
run: pnpm build | ||
|
||
- name: Prepare ${{ env.NPM_VERSION }} | ||
run: | | ||
npm --no-git-tag-version version ${{ env.NPM_VERSION }} | ||
- name: Publish ${{ env.NPM_VERSION }} | ||
run: | | ||
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' >> ./.npmrc | ||
npm publish --tag ${{ env.NPM_TAG }} | ||
git checkout -- .npmrc | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
release-docker: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- release-npm | ||
- mutex | ||
|
||
permissions: | ||
contents: read | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters