forked from stackpath/node-grpc-error-details
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: 👷 Fully use github actions for releasing
Use github actions to draft releases & publish releases. Added renovate config with automatic merging of pr's.
- Loading branch information
Showing
6 changed files
with
154 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name-template: '$RESOLVED_VERSION' | ||
tag-template: '$RESOLVED_VERSION' | ||
categories: | ||
- title: '🚀 Features' | ||
labels: | ||
- 'feature' | ||
- 'enhancement' | ||
- title: '🐛 Bug Fixes' | ||
labels: | ||
- 'fix' | ||
- 'bugfix' | ||
- 'bug' | ||
- title: '🧰 Maintenance' | ||
labels: | ||
- 'chore' | ||
- 'dependencies' | ||
change-template: '- $TITLE @$AUTHOR (#$NUMBER)' | ||
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||
prerelease: true | ||
version-resolver: | ||
major: | ||
labels: | ||
- 'major' | ||
minor: | ||
labels: | ||
- 'minor' | ||
patch: | ||
labels: | ||
- 'patch' | ||
default: patch | ||
template: | | ||
## Changes | ||
$CHANGES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
"github>Q42Philips/alexandria" | ||
], | ||
"packageRules": [ | ||
{ | ||
"matchUpdateTypes": [ | ||
"patch", | ||
"pin", | ||
"digest" | ||
], | ||
"automerge": true, | ||
"appendLabels": [ | ||
"patch" | ||
] | ||
}, | ||
{ | ||
"matchUpdateTypes": [ | ||
"minor" | ||
], | ||
"automerge": true, | ||
"appendLabels": [ | ||
"minor" | ||
] | ||
}, | ||
{ | ||
"matchUpdateTypes": [ | ||
"major" | ||
], | ||
"automerge": true, | ||
"appendLabels": [ | ||
"major" | ||
] | ||
} | ||
], | ||
"rebaseWhen": "behind-base-branch", | ||
"automergeStrategy": "fast-forward", | ||
"automergeType": "pr" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,33 @@ | ||
name: Build and test | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
pull_request: | ||
types: [ready_for_review] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: [ '10', '12', '14', '16' ] | ||
name: Run in node v${{ matrix.node }} | ||
node: [ '14', '16', '18', '20' ] | ||
name: Test / node v${{ matrix.node }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up node v${{ matrix.node }} | ||
uses: actions/setup-node@v2 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Install global dependencies | ||
run: yarn global add node-pre-gyp | ||
cache-dependency-path: ./package-lock.json | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
run: npm install | ||
|
||
- name: Run tests | ||
run: yarn test | ||
run: npm test | ||
|
||
- name: Build | ||
run: yarn build | ||
run: npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Publish pre-release package to GitHub Packages | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# Setup .npmrc file to publish to GitHub Packages | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
registry-url: 'https://npm.pkg.github.com' | ||
- run: npm ci | ||
- run: npm test | ||
- run: npm run build | ||
# beta release | ||
- name: pre-release version | ||
if: github.event.release.prerelease == true | ||
run: npm version ${{ github.event.release.tag_name }}-beta --allow-same-version true --git-tag-version false | ||
|
||
- name: publish beta | ||
if: github.event.release.prerelease == false | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# full release | ||
- name: relese version | ||
if: github.event.release.prerelease == false | ||
run: npm version ${{ github.event.release.tag_name }} --allow-same-version true --git-tag-version false | ||
|
||
- name: publish release | ||
if: github.event.release.prerelease == false | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Release Drafter | ||
concurrency: | ||
group: ci-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
push: | ||
# branches to consider in the event; optional, defaults to all | ||
branches: | ||
- main | ||
- master | ||
workflow_dispatch: | ||
# manual workflow dispatch; optional | ||
|
||
jobs: | ||
update_release_draft: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Drafts your next Release notes as Pull Requests are merged into "master" | ||
- uses: release-drafter/release-drafter@v5 | ||
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml | ||
# with: | ||
# config-name: my-config.yml | ||
# disable-autolabeler: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.