Skip to content

Commit 70d64ea

Browse files
Merge branch 'main' into mk/windows-page-paths
2 parents b5ba87d + b2f8f5b commit 70d64ea

File tree

8 files changed

+439
-298
lines changed

8 files changed

+439
-298
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}}

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

Lines changed: 1 addition & 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 --exit-code $CACHED_COMMIT_REF $COMMIT_REF ../../"
45

5-
# ignore = "git diff --exit-code $CACHED_COMMIT_REF $COMMIT_REF ../../"
66
[dev]
77
command = "npm run start"
88
targetPort = 4200

0 commit comments

Comments
 (0)