Skip to content

Commit 7a73ede

Browse files
committed
Merge branch 'main' of github.com:netlify-labs/vite-plugin-netlify-edge
2 parents a90b480 + 027eae6 commit 7a73ede

File tree

6 files changed

+157
-36
lines changed

6 files changed

+157
-36
lines changed

.github/.kodiak.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version = 1
2+
3+
[merge.automerge_dependencies]
4+
versions = ["minor", "patch"]
5+
usernames = ["renovate"]
6+
7+
[approve]
8+
auto_approve_usernames = ["renovate"]

.github/workflows/labeller.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Label PR
2+
on:
3+
pull_request:
4+
types: [opened, edited]
5+
6+
jobs:
7+
label-pr:
8+
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
pr:
13+
[
14+
{ prefix: 'fix', type: 'bug' },
15+
{ prefix: 'chore', type: 'chore' },
16+
{ prefix: 'test', type: 'chore' },
17+
{ prefix: 'ci', type: 'chore' },
18+
{ prefix: 'feat', type: 'feature' },
19+
{ prefix: 'security', type: 'security' },
20+
]
21+
steps:
22+
- uses: netlify/[email protected]
23+
if: startsWith(github.event.pull_request.title, matrix.pr.prefix)
24+
with:
25+
token: '${{ secrets.GITHUB_TOKEN }}'
26+
label: 'type: ${{ matrix.pr.type }}'

.github/workflows/pre-release.yml

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

package-lock.json

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

renovate.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"local>netlify/renovate-config"
5+
]
6+
}

0 commit comments

Comments
 (0)