-
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
4 changed files
with
2,345 additions
and
76 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,65 @@ | ||
name: release | ||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
verify: | ||
name: verify | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: yarn | ||
- name: Install | ||
run: yarn install --immutable | ||
- name: Typecheck | ||
run: yarn check:types | ||
- name: Tests | ||
run: yarn test | ||
|
||
release: | ||
name: release | ||
needs: verify | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # to be able to publish a GitHub release | ||
issues: write # to be able to comment on released issues | ||
pull-requests: write # to be able to comment on released pull requests | ||
steps: | ||
- name: Generate bot token | ||
id: generate_token | ||
uses: tibdex/github-app-token@v1 | ||
with: | ||
app_id: ${{ secrets.RELEASE_BOT_APP_ID }} | ||
private_key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }} | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ steps.generate_token.outputs.token }} | ||
- name: Setup git user | ||
uses: gotmax23/[email protected] | ||
with: | ||
global: true | ||
bot: ${{ vars.RELEASE_BOT_ID }} | ||
name: ${{ vars.RELEASE_BOT_NAME }} | ||
- name: Setup | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: yarn | ||
- name: Install | ||
run: yarn install --immutable | ||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} | ||
NPM_TOKEN: ${{ secrets.NPM_PUBLISH }} | ||
run: yarn release |
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,15 @@ | ||
git: | ||
commitMessage: 'chore(sdk): release v${version} [no ci]' | ||
requireBranch: main | ||
tagName: 'v${version}' | ||
requireCommits: true # Only release if there are any changes to release | ||
github: | ||
release: true | ||
releaseName: 'v${version}' | ||
plugins: | ||
'@release-it/conventional-changelog': | ||
preset: | ||
name: conventionalcommits | ||
infile: 'CHANGELOG.md' | ||
npm: | ||
publish: true |
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.