-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1322 from wix-incubator/fix_workflow2
fix workflow2
- Loading branch information
Showing
1 changed file
with
11 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,6 @@ permissions: | |
pull-requests: write | ||
packages: write | ||
|
||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
@@ -30,6 +29,7 @@ jobs: | |
cache: 'npm' | ||
- run: npm ci | ||
- run: npm run lint | ||
|
||
tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
|
@@ -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: | ||
|
@@ -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' | ||
|
@@ -113,5 +117,3 @@ jobs: | |
env: | ||
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }} | ||
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }} | ||
|
||
|