feat: migrate to node v16 (#611)

* ci: support manual release and fix commit message

* feat: require node v16
This commit is contained in:
Michael Kriese 2022-03-06 14:52:32 +01:00 committed by GitHub
parent 61ab5a7228
commit 825caf3e3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 6 deletions

View file

@ -3,6 +3,7 @@ name: Build
on: on:
push: push:
pull_request: pull_request:
workflow_dispatch:
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }} group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
@ -32,7 +33,7 @@ jobs:
- name: Setup node - name: Setup node
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # tag=v3.0.0 uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # tag=v3.0.0
with: with:
node-version: '12.x' node-version: '16.x'
cache: 'yarn' cache: 'yarn'
- name: Install project - name: Install project
@ -85,8 +86,11 @@ jobs:
needs: [build] needs: [build]
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: | if: |
startsWith(github.event.commits[0].message, (
'fix(deps): update renovate/renovate docker tag ') startsWith(github.event.commits[0].message, 'fix(deps): update renovate/renovate docker tag ')
|| startsWith(github.event.commits[0].message, 'fix(deps): update dependency renovate/renovate ')
|| github.event_name == 'workflow_dispatch'
)
&& github.ref == 'refs/heads/main' && github.ref == 'refs/heads/main'
steps: steps:
- name: Checkout - name: Checkout
@ -106,7 +110,7 @@ jobs:
- name: Setup node - name: Setup node
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # tag=v3.0.0 uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # tag=v3.0.0
with: with:
node-version: '12.x' node-version: '16.x'
- name: Install project - name: Install project
run: yarn install --frozen-lockfile --ignore-scripts run: yarn install --frozen-lockfile --ignore-scripts
- name: Get version - name: Get version

View file

@ -17,5 +17,5 @@ inputs:
environment variable. environment variable.
required: false required: false
runs: runs:
using: node12 using: node16
main: dist/index.js main: dist/index.js

View file

@ -4,6 +4,10 @@
"description": "GitHub Action to run Renovate self-hosted.", "description": "GitHub Action to run Renovate self-hosted.",
"private": true, "private": true,
"main": "src/index.ts", "main": "src/index.ts",
"engines": {
"node": " >=16.0.0",
"yarn": ">=1.22.0"
},
"scripts": { "scripts": {
"format": "prettier --ignore-unknown --write \"**/*.*\"", "format": "prettier --ignore-unknown --write \"**/*.*\"",
"format:file": "prettier --write", "format:file": "prettier --write",
@ -17,7 +21,7 @@
"release:commit": "git add --force dist", "release:commit": "git add --force dist",
"release:standard-version": "standard-version --release-as", "release:standard-version": "standard-version --release-as",
"release": "run-s build release:commit \"release:standard-version -- {1}\" --", "release": "run-s build release:commit \"release:standard-version -- {1}\" --",
"build": "ncc build -o dist", "build": "ncc build -o dist --target es2021",
"start": "run-s build && node dist", "start": "run-s build && node dist",
"prepare": "husky install" "prepare": "husky install"
}, },