Skip to content

Commit db68841

Browse files
committed
Merge branch 'main' into mk/no-beta
2 parents 9a35435 + d16b10d commit db68841

File tree

21 files changed

+5808
-25305
lines changed

21 files changed

+5808
-25305
lines changed

.github/workflows/pre-release.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: prerelease
2+
on:
3+
push:
4+
branches:
5+
# releases/<tag>/<version>
6+
- releases/*/*
7+
jobs:
8+
prerelease:
9+
runs-on: ubuntu-latest
10+
environment: production
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v2
14+
with:
15+
node-version: '*'
16+
cache: 'npm'
17+
check-latest: true
18+
registry-url: 'https://registry.npmjs.org'
19+
- name: Install core dependencies
20+
run: npm ci --no-audit
21+
- name: Extract tag and version
22+
id: extract
23+
run: |-
24+
ref=${{ github.ref }}
25+
branch=${ref:11}
26+
tag_version=${branch:9}
27+
tag=${tag_version%/*}
28+
version=${tag_version##*/}
29+
echo "::set-output name=tag::${tag}"
30+
echo "::set-output name=version::${version}"
31+
- name: Log versions
32+
run: |-
33+
echo tag=${{ steps.extract.outputs.tag }}
34+
echo version=${{ steps.extract.outputs.version }}
35+
- name: Setup git user
36+
run: git config --global user.name github-actions
37+
- name: Setup git email
38+
run: git config --global user.email [email protected]
39+
- name: Run npm version
40+
run: npm version ${{ steps.extract.outputs.version }}-${{ steps.extract.outputs.tag }} --allow-same-version
41+
- name: Push changes
42+
run: git push --follow-tags
43+
- name: Run npm publish
44+
run: npm publish --tag=${{ steps.extract.outputs.tag }}
45+
env:
46+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

.github/workflows/release-please.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,29 @@ on:
66
jobs:
77
release-please:
88
runs-on: ubuntu-latest
9+
environment: production
910
steps:
1011
- uses: navikt/github-app-token-generator@a9cd374e271b8aef573b8c16ac46c44fb89b02db
1112
id: get-token
1213
with:
1314
private-key: ${{ secrets.TOKENS_PRIVATE_KEY }}
1415
app-id: ${{ secrets.TOKENS_APP_ID }}
1516
- uses: GoogleCloudPlatform/release-please-action@v2
17+
id: release
1618
with:
1719
token: ${{ steps.get-token.outputs.token }}
1820
release-type: node
1921
package-name: '@netlify/plugin-nextjs'
22+
- uses: actions/checkout@v2
23+
if: ${{ steps.release.outputs.release_created }}
24+
- uses: actions/setup-node@v2
25+
with:
26+
node-version: '*'
27+
cache: 'npm'
28+
check-latest: true
29+
registry-url: 'https://registry.npmjs.org'
30+
if: ${{ steps.release.outputs.release_created }}
31+
- run: npm publish
32+
if: ${{ steps.release.outputs.release_created }}
33+
env:
34+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

cypress/config/ci.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
"pluginsFile": "../../cypress/plugins",
55
"screenshotsFolder": "../../cypress/screenshots",
66
"supportFile": "../../cypress/support/index.js",
7-
"videoFolder": "../../cypress/videos"
7+
"videoFolder": "../../cypress/videos",
8+
"projectId": "66va58"
89
}

cypress/config/nx-demo.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
"pluginsFile": "../../cypress/plugins",
55
"screenshotsFolder": "../../cypress/screenshots",
66
"supportFile": "../../cypress/support/index.js",
7-
"videoFolder": "../../cypress/videos"
7+
"videoFolder": "../../cypress/videos",
8+
"projectId": "ijcdpo"
89
}

cypress/config/static-root.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
"pluginsFile": "../../cypress/plugins",
55
"screenshotsFolder": "../../cypress/screenshots",
66
"supportFile": "../../cypress/support/index.js",
7-
"videoFolder": "../../cypress/videos"
7+
"videoFolder": "../../cypress/videos",
8+
"projectId": "3tvrbe"
89
}

demos/default/local-plugin/package-lock.json

Lines changed: 1 addition & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demos/default/netlify.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
[build]
22
command = "next build"
33
publish = ".next"
4-
ignore = "echo CACHED_COMMIT_REF: $CACHED_COMMIT_REF COMMIT_REF: $COMMIT_REF && git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../../"
54

5+
# ignore = "echo CACHED_COMMIT_REF: $CACHED_COMMIT_REF COMMIT_REF: $COMMIT_REF && git diff --exit-code $CACHED_COMMIT_REF $COMMIT_REF ../../"
66
[build.environment]
77
# cache Cypress binary in local "node_modules" folder
88
# so Netlify caches it
99
CYPRESS_CACHE_FOLDER = "../node_modules/.CypressBinary"
10+
# set TERM variable for terminal output
11+
TERM = "xterm"
1012

1113
[dev]
1214
framework = "#static"
@@ -21,4 +23,5 @@ package = "@netlify/plugin-local-install-core"
2123
package = "netlify-plugin-cypress"
2224

2325
[context.deploy-preview.plugins.inputs]
26+
record = true
2427
configFile = "../../cypress/config/ci.json"

demos/nx-next-monorepo-demo/local-plugin/package-lock.json

Lines changed: 1 addition & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demos/nx-next-monorepo-demo/netlify.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[build]
22
command = "npm run build"
33
publish = "dist/apps/demo-monorepo/.next"
4-
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../../"
54

5+
# ignore = "git diff --exit-code $CACHED_COMMIT_REF $COMMIT_REF ../../"
66
[dev]
77
command = "npm run start"
88
targetPort = 4200
@@ -14,6 +14,8 @@ package = "./local-plugin"
1414
# cache Cypress binary in local "node_modules" folder
1515
# so Netlify caches it
1616
CYPRESS_CACHE_FOLDER = "../node_modules/.CypressBinary"
17+
# set TERM variable for terminal output
18+
TERM = "xterm"
1719

1820
[[plugins]]
1921
package = "@netlify/plugin-local-install-core"
@@ -22,4 +24,5 @@ package = "@netlify/plugin-local-install-core"
2224
package = "netlify-plugin-cypress"
2325

2426
[context.deploy-preview.plugins.inputs]
27+
record = true
2528
configFile = "../../cypress/config/nx-demo.json"

0 commit comments

Comments
 (0)