-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use custom release please script (#174)
* feat: use custom release please script * fix: install commitlint deps to package.json * fix: add breaking changes to changelog notes * chore: add tap timeout * fix: allow git installs for required packages * fix: use actions/checkout for pull requests and make setup deps partial * fix: pass token to release please * fix: check out headRefName from release please PR * fix: allow release please to pass in branch name for testing * fix: add node-workspace plugin * fix: branch name typo * feat: exclude other package commits from root * feat: call release-test workflow after updating release PR * fix: checkout head ref for dependabot * feat: add change default versioning strategy * feat: rewrite workspace deps * fix: use release please fork * fix: only write release test file if necessary * fix: set release please title patterns
- Loading branch information
1 parent
8e4e66d
commit 7562777
Showing
33 changed files
with
1,260 additions
and
128 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,6 @@ | ||
{ | ||
"ignorePatterns": [ | ||
"lib/content/*", | ||
"!lib/content/index.js" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
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
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
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
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
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,86 @@ | ||
# This file is automatically added by @npmcli/template-oss. Do not edit. | ||
|
||
name: Release | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
ref: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
lint-all: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
- name: Setup git user | ||
run: | | ||
git config --global user.email "npm-cli+bot@github.com" | ||
git config --global user.name "npm CLI robot" | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
- name: Update npm to latest | ||
run: npm i --prefer-online --no-fund --no-audit -g npm@latest | ||
- run: npm -v | ||
- run: npm i --ignore-scripts --no-audit --no-fund | ||
- run: npm run lint --if-present --workspaces --include-workspace-root | ||
|
||
test-all: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node-version: | ||
- 12.13.0 | ||
- 12.x | ||
- 14.15.0 | ||
- 14.x | ||
- 16.0.0 | ||
- 16.x | ||
platform: | ||
- os: ubuntu-latest | ||
shell: bash | ||
- os: macos-latest | ||
shell: bash | ||
- os: windows-latest | ||
shell: cmd | ||
runs-on: ${{ matrix.platform.os }} | ||
defaults: | ||
run: | ||
shell: ${{ matrix.platform.shell }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
- name: Setup git user | ||
run: | | ||
git config --global user.email "npm-cli+bot@github.com" | ||
git config --global user.name "npm CLI robot" | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Update to workable npm (windows) | ||
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows | ||
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.')) | ||
run: | | ||
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz | ||
tar xf npm-7.5.4.tgz | ||
cd package | ||
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz | ||
cd .. | ||
rmdir /s /q package | ||
- name: Update npm to 7 | ||
# If we do test on npm 10 it needs npm7 | ||
if: startsWith(matrix.node-version, '10.') | ||
run: npm i --prefer-online --no-fund --no-audit -g npm@7 | ||
- name: Update npm to latest | ||
if: ${{ !startsWith(matrix.node-version, '10.') }} | ||
run: npm i --prefer-online --no-fund --no-audit -g npm@latest | ||
- run: npm -v | ||
- run: npm i --ignore-scripts --no-audit --no-fund | ||
- name: add tap problem matcher | ||
run: echo "::add-matcher::.github/matchers/tap.json" | ||
- run: npm run test --if-present --workspaces --include-workspace-root |
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,31 @@ | ||
#!/usr/bin/env node | ||
|
||
const core = require('@actions/core') | ||
const main = require('../lib/release-please/index.js') | ||
|
||
const dryRun = !process.env.CI | ||
const [branch] = process.argv.slice(2) | ||
|
||
const setOutput = (key, val) => { | ||
if (val && (!Array.isArray(val) || val.length)) { | ||
if (dryRun) { | ||
console.log(key, JSON.stringify(val, null, 2)) | ||
} else { | ||
core.setOutput(key, JSON.stringify(val)) | ||
} | ||
} | ||
} | ||
|
||
main({ | ||
token: process.env.GITHUB_TOKEN, | ||
repo: process.env.GITHUB_REPOSITORY, | ||
dryRun, | ||
branch, | ||
}).then(({ pr, releases, release }) => { | ||
setOutput('pr', pr) | ||
setOutput('releases', releases) | ||
setOutput('release', release) | ||
return null | ||
}).catch(err => { | ||
core.setFailed(`failed: ${err}`) | ||
}) |
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
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
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
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
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
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
Oops, something went wrong.