-
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.
- Loading branch information
Stanislav Lysak
committed
Oct 2, 2024
1 parent
98fa7ca
commit 0e566d4
Showing
3 changed files
with
183 additions
and
3 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,61 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
env: | ||
FORCE_COLOR: true | ||
|
||
jobs: | ||
changelog: | ||
name: PR or Release | ||
if: ${{ github.repository_owner == 'ensdomains' }} | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
id-token: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/checkout@v4 | ||
- name: Enable corepack | ||
run: corepack enable pnpm | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
cache: 'pnpm' | ||
node-version: 18 | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Build Packages | ||
run: pnpm -r build | ||
|
||
- name: Fix npmrc | ||
run: npm config set "//registry.npmjs.org/:_authToken" "$NPM_TOKEN" | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Create Release Pull Request or Publish | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
# Note: pnpm install after versioning is necessary to refresh lockfile | ||
version: pnpm chgset:version | ||
publish: pnpm release | ||
commit: "chore: release" | ||
title: "[ci] release" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# Needs access to publish to npm | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NPM_CONFIG_PROVENANCE: 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.