Skip to content
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

fix again #1318

Merged
merged 1 commit into from
Dec 24, 2024
Merged
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
27 changes: 8 additions & 19 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.PAT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Install, build, configure git and lerna publish
uses: actions/setup-node@v3
Expand All @@ -67,12 +67,11 @@ jobs:
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run build --if-present
- name: Configure Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions - Pro Gallery"
# Using a different format for the remote URL
git remote set-url origin "https://x-access-token:${{ secrets.PAT_TOKEN }}@github.com/wix/pro-gallery.git"
- run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git remote set-url origin 'https://'"${{ secrets.PAT_TOKEN }}"'@github.com/wix/pro-gallery.git'

- run: |
echo "registry=http://registry.npmjs.org/" >> .npmrc
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
Expand All @@ -82,27 +81,17 @@ jobs:
if: github.event_name == 'push'
run: |
git checkout ${{ github.ref_name }}
# Add these diagnostic commands
echo "Current branch: $(git branch --show-current)"
echo "Git status: $(git status)"
# Configure npm and lerna to use the PAT token for GitHub operations
npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
npm config set @wix:registry=https://registry.npmjs.org/
# Run lerna with explicit authentication
npx lerna publish patch --exact --yes --dist-tag stable --registry https://registry.npmjs.org/ --allow-branch ${{ github.ref_name }} --force-publish
lerna publish patch --exact --yes --dist-tag stable --registry https://registry.npmjs.org --allow-branch ${{ github.ref_name }}
npm run changelog
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.PAT_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Push to pull request
if: github.event_name == 'pull_request' && github.actor != 'dependabot'
run: |
npx lerna publish --canary --preid ${{ github.sha }} --yes --registry https://registry.npmjs.org/ --allow-branch ${{ github.ref_name }} --force-publish
run: lerna publish --canary --preid ${{ github.sha }} --yes --registry https://registry.npmjs.org --allow-branch ${{ github.ref_name }}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.PAT_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

update-playground:
runs-on: ubuntu-latest
Expand Down
Loading