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 workflow2 #1322

Merged
merged 1 commit into from
Dec 26, 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
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 }}


Loading