-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
2,188 additions
and
77 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,50 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
VERSION_BUMP: | ||
description: 'The version bump' | ||
type: choice | ||
options: | ||
- major | ||
- minor | ||
- patch | ||
default: minor | ||
required: true | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
concurrency: 1 | ||
environment: release | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.RELEASE_GITHUB_TOKEN }} | ||
|
||
- name: Setup Node.js version | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Enable yarn | ||
run: corepack enable | ||
|
||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Configure git | ||
run: | | ||
git config user.name "Uphold" | ||
git config user.email "[email protected]" | ||
- name: Generate release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.RELEASE_NPM_TOKEN }} | ||
run: | | ||
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc | ||
npm run release -- --increment "${{ github.event.inputs.VERSION_BUMP }}" -V |
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,19 @@ | ||
name: Test | ||
|
||
on: [push] | ||
|
||
jobs: | ||
unit: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: ['18', '20'] | ||
|
||
container: | ||
image: node:${{ matrix.node }}-alpine | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: yarn install --frozen-lockfile | ||
- run: yarn lint | ||
- run: yarn test |
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,22 @@ | ||
module.exports = { | ||
git: { | ||
changelog: 'echo "## Changelog\\n\\n$(npx @uphold/github-changelog-generator -f unreleased | tail -n +4 -f)"', | ||
commitMessage: 'Release ${version}', | ||
requireBranch: 'master', | ||
requireCommits: true, | ||
tagName: 'v${version}' | ||
}, | ||
github: { | ||
release: true, | ||
releaseName: 'v${version}' | ||
}, | ||
hooks: { | ||
'after:bump': ` | ||
echo "$(npx @uphold/github-changelog-generator -f v\${version})\n$(tail -n +2 CHANGELOG.md)" > CHANGELOG.md && | ||
git add CHANGELOG.md --all | ||
` | ||
}, | ||
npm: { | ||
publish: true | ||
} | ||
}; |
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
Oops, something went wrong.