Skip to content

chore: update automation and readme #692

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

Merged
merged 8 commits into from
Oct 14, 2021
Merged
Show file tree
Hide file tree
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
60 changes: 60 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Bug Report
description: Create a report to help us improve
title: '[Bug]: '
labels: ['type: bug']
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to reproduce
description: Steps to reproduce the behavior
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: true
- type: input
id: link-to-reproduction
attributes:
label: A link to a reproduction repository
description: The fastest way to describe your bug is to provide a reproduction repository.
placeholder: https://github.com/project/link-to-your-reproduction-repo
- type: markdown
attributes:
value: |
Check out [CONTRIBUTING.md](https://github.com/netlify/netlify-plugin-nextjs/blob/main/CONTRIBUTING.md#what-is-a-reproducible-test-case) for advice on producing a reproduction repo.
- type: checkboxes
id: more-info
attributes:
label: More information about your build
options:
- label: I am building using the CLI
- label: I am building using file-based configuration (netlify.toml)
- type: dropdown
id: which-os
attributes:
label: What OS are you using?
description: (If you're using the CLI) What OS are you using?
options:
- Windows
- Mac OS
- Linux
- Other
- type: textarea
id: netlify-toml
attributes:
label: Your `netlify.toml` file
description: (If you're using file-based config) Please provide a copy of your `netlify.toml` file.
render: shell
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output (or link to your logs)
37 changes: 37 additions & 0 deletions .github/workflows/fossa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Dependency License Scanning

on:
push:
branches:
- main
- chore/fossa-workflow # convenience branch for future fossa tweaks

defaults:
run:
shell: bash

jobs:
fossa:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download fossa cli
run: |-
curl -L https://github.com/fossas/fossa-cli/releases/download/v1.1.2/fossa-cli_1.1.2_linux_amd64.tar.gz > fossa-cli.tar.gz
tar -xvzf fossa-cli.tar.gz
mkdir -p $HOME/.local/bin
echo "$HOME/.local/bin" >> $GITHUB_PATH
mv fossa $HOME/.local/bin/fossa
- name: Fossa init
run: fossa init
- name: Set env
run: echo "line_number=$(grep -n "project" .fossa.yml | cut -f1 -d:)" >> $GITHUB_ENV
- name: Configuration
run: |-
sed -i "${line_number}s|.*| project: [email protected]:${GITHUB_REPOSITORY}.git|" .fossa.yml
cat .fossa.yml
- name: Upload dependencies
run: fossa analyze --debug
env:
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
19 changes: 19 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: release-please
on:
push:
branches:
- main
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: navikt/github-app-token-generator@2d70c12368d1958155af4d283f9f21c9a2a8cb98
id: get-token
with:
private-key: ${{ secrets.TOKENS_PRIVATE_KEY }}
app-id: ${{ secrets.TOKENS_APP_ID }}
- uses: GoogleCloudPlatform/release-please-action@v2
with:
token: ${{ steps.get-token.outputs.token }}
release-type: node
package-name: '@netlify/plugin-nextjs'
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
node-version: ['*']
node-version: [12, '*']
exclude:
- os: macOS-latest
node-version: 12
Expand Down
47 changes: 47 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Contributions

🎉 Thanks for considering contributing to this project! 🎉

These guidelines will help you send a pull request.

If you're submitting an issue instead, please skip this document.

If your pull request is related to a typo or the documentation being unclear, please click on the relevant page's `Edit`
button (pencil icon) and directly suggest a correction instead.

This project was made with ❤️. The simplest way to give back is by starring and sharing it online.

Everyone is welcome regardless of personal background. We enforce a [Code of conduct](CODE_OF_CONDUCT.md) in order to
promote a positive and inclusive environment.

## Development process

First fork and clone the repository. If you're not sure how to do this, please watch
[these videos](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github).

Run:

```bash
npm install
```

Make sure everything is correctly setup with:

```bash
npm test
```

## How to write commit messages

We use [Conventional Commit messages](https://www.conventionalcommits.org/) to automate version management.

Most common commit message prefixes are:

* `fix:` which represents bug fixes, and generate a patch release.
* `feat:` which represents a new feature, and generate a minor release.
* `feat!:`, `fix!:` or `refactor!:` and generate a major release.

## Releasing

1. Merge the release PR
2. Run `npm publish`
29 changes: 21 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
# Essential Next.js (Experimental)
![Next.js on Netlify Build Plugin](next-on-netlify.png)

_Experimental plugin for Next.js applications on Netlify_
# Essential Next.js Build Plugin (beta)

:warning: This plugin is an alpha for testing purposes only. It is not yet stable and should not be used for production sites.

## Installing the alpha
:warning: This is the beta version of the Essential Next.js plugin. For the stable version, see [Essential Next.js plugin v3](https://github.com/netlify/netlify-plugin-nextjs/tree/v3#readme) :warning:

<p align="center">
<a aria-label="npm version" href="https://www.npmjs.com/package/@netlify/plugin-nextjs">
<img alt="" src="https://img.shields.io/npm/v/@netlify/plugin-nextjs">
</a>
<a aria-label="MIT License" href="https://img.shields.io/npm/l/@netlify/plugin-nextjs">
<img alt="" src="https://img.shields.io/npm/l/@netlify/plugin-nextjs">
</a>
</p>


## Installing the beta


- Remove the existing Essential Next.js plugin (`@netlify/plugin-nextjs`). See the instructions to [uninstall the plugin](https://ntl.fyi/remove-plugin)
- Install the module:
```shell
npm install -D @netlify/plugin-nextjs-experimental
npm install -D @netlify/plugin-nextjs@beta
```
- Change the `publish` directory to `.next` and add the plugin to `netlify.toml`:
- Change the `publish` directory to `.next` and add the plugin to `netlify.toml` if not already installed:
```toml
[build]
publish = ".next"

[[plugins]]
package = "@netlify/plugin-nextjs-experimental"
package = "@netlify/plugin-nextjs"
```

If you previously set `target: "serverless"` in your `next.config.js` this is no longer needed and can be removed.
4 changes: 4 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This is just for jest
module.exports = {
presets: [['@babel/preset-env', { targets: { node: 'current' } }]],
}
Binary file added next-on-netlify.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading