-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
53dbcd7
commit 5335f0b
Showing
5 changed files
with
2,296 additions
and
39 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 @@ | ||
!.release-it.js |
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,56 @@ | ||
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: infrastructure-production-toolbox-ubuntu22-2g-1cpu-x64 | ||
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: Setup SSH Keys and known_hosts | ||
run: | | ||
eval `ssh-agent` | ||
ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}" | ||
echo "SSH_AGENT_PID=$SSH_AGENT_PID" >> $GITHUB_ENV | ||
echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK" >> $GITHUB_ENV | ||
mkdir -p ~/.ssh && | ||
ssh-keyscan github.com >> ~/.ssh/known_hosts | ||
- 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 }} | ||
run: yarn 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,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: false | ||
} | ||
}; |
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.