Skip to content

Commit

Permalink
Merge pull request #1322 from wix-incubator/fix_workflow2
Browse files Browse the repository at this point in the history
fix workflow2
  • Loading branch information
yoavtsook2806 authored Dec 26, 2024
2 parents c651932 + d9e15ac commit 641aa43
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ permissions:
pull-requests: write
packages: write


jobs:
lint:
runs-on: ubuntu-latest
Expand All @@ -30,6 +29,7 @@ jobs:
cache: 'npm'
- run: npm ci
- run: npm run lint

tests:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -58,9 +58,11 @@ jobs:
strategy:
matrix:
node-version: [16.20.0]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.PAT_TOKEN }}
fetch-depth: 0
- name: Install, build, configure git and lerna publish
uses: actions/setup-node@v2
with:
Expand All @@ -69,29 +71,31 @@ jobs:
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run build --if-present
- run: git config --global user.email "[email protected]"
- run: git config --global user.name "GitHub Actions"
- run: git remote set-url origin https://[email protected]/wix/pro-gallery
- 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
echo "registry=http://registry.npmjs.org/" >> .npmrc
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
- name: Push to master
if: github.event_name == 'push'
# run: echo "this is a push to master"
run: |
git checkout ${{ github.ref_name }}
lerna publish patch --exact --yes --dist-tag stable --registry https://registry.npmjs.org
npm run changelog
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
- name: Push to pull request
if: github.event_name == 'pull_request' && github.actor != 'dependabot'
# run: echo "PULL REQUEST PUSH"
run: lerna publish --canary --preid ${{ github.sha }} --yes --registry https://registry.npmjs.org
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}

update-playground:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
Expand All @@ -113,5 +117,3 @@ jobs:
env:
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}


0 comments on commit 641aa43

Please sign in to comment.