-
-
Notifications
You must be signed in to change notification settings - Fork 1
add github workflow for npm release #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
615d6a7
feat: support rn 0.76
ieow 3ad58f4
fix: require @react-native-community/cli
ieow 971cd07
fix: filterByAuthorizedAccounts
ieow f3ef39a
Merge branch 'main' into feat/rn0.76
ieow 97d5133
feat: rename package
ieow 568a680
feat: github ci workflow
ieow cbf746d
chore: remove node 18.x ci check
ieow 24a0bf5
fix: add allowscript
ieow 67a22e9
chore: add build script
ieow fe99fad
fix: yarn
ieow 8fff19d
fix: update corepack enable
ieow 7f7e88a
fix: yarn v4 ci
ieow 439623f
fix: ci syntax
ieow e59bc81
fix: ci syntax
ieow 87748e0
chore: use jq
ieow 7f49bb8
fix: yarn 4.9.2
ieow 23ec411
chore: update checkout and setup action
ieow c09f320
fix: ci syntax
ieow 5886efa
fix: remove unused file
ieow caf8e34
fix: add matrix version
ieow a25e5a3
chore: update changelog.md
ieow 0af287f
chore: remove .yarnrc
ieow e8407cd
Merge branch 'main' into feat/github-workflow
ieow 45307c9
feat: update yarn, lib
ieow 6e9a070
fix: syntax
ieow 508a069
fix: call all lint's script in lint
ieow ecbfca0
fix: changelog
ieow 25e30a7
chore: add depcheck ignore
ieow e657dac
chore: update depcheck ignore
ieow 5ddd553
fix: address comment
ieow File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,30 @@ | ||
{ | ||
"ignores": [ | ||
"@commitlint/config-conventional", | ||
"@evilmartians/lefthook", | ||
"@react-native-community/cli", | ||
"@react-native/eslint-config", | ||
"@release-it/conventional-changelog", | ||
"@typescript-eslint/eslint-plugin", | ||
"commitlint", | ||
"turbo", | ||
"@lavamoat/allow-scripts", | ||
"@lavamoat/preinstall-always-fail", | ||
"@metamask/auto-changelog", | ||
"@metamask/eslint-config", | ||
"@metamask/eslint-config-*", | ||
"@types/*", | ||
"@typescript-eslint/utils", | ||
"@vitest/coverage-istanbul", | ||
"@vitest/eslint-plugin", | ||
"@yarnpkg/types", | ||
"eslint-config-*", | ||
"eslint-import-resolver-typescript", | ||
"eslint-plugin-*", | ||
"prettier-plugin-packagejson", | ||
"ts-node", | ||
"typedoc", | ||
"typescript-eslint", | ||
"vite" | ||
] | ||
} |
This file contains hidden or 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,4 @@ | ||
# Lines starting with '#' are comments. | ||
# Each line is a file pattern followed by one or more owners. | ||
|
||
* @MetaMask/engineering |
This file contains hidden or 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 hidden or 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 @@ | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: 'npm' | ||
directory: '/' | ||
schedule: | ||
interval: 'daily' | ||
time: '06:00' | ||
allow: | ||
- dependency-name: '@metamask/*' | ||
target-branch: 'main' | ||
versioning-strategy: 'increase-if-necessary' | ||
open-pull-requests-limit: 10 |
This file contains hidden or 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,117 @@ | ||
name: Build, Lint, and Test | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
prepare: | ||
name: Prepare | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20.x, 22.x] | ||
steps: | ||
- name: Checkout and setup environment | ||
uses: MetaMask/action-checkout-and-setup@v1 | ||
with: | ||
is-high-risk-environment: false | ||
node-version: ${{ matrix.node-version }} | ||
cache-node-modules: ${{ matrix.node-version == '22.x' }} | ||
|
||
build: | ||
name: Build | ||
needs: prepare | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [22.x] | ||
steps: | ||
- name: Checkout and setup environment | ||
uses: MetaMask/action-checkout-and-setup@v1 | ||
with: | ||
is-high-risk-environment: false | ||
node-version: ${{ matrix.node-version }} | ||
- run: yarn build | ||
- name: Require clean working directory | ||
shell: bash | ||
run: | | ||
if ! git diff --exit-code; then | ||
echo "Working tree dirty at end of job" | ||
exit 1 | ||
fi | ||
|
||
lint: | ||
name: Lint | ||
needs: prepare | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [22.x] | ||
steps: | ||
- name: Checkout and setup environment | ||
uses: MetaMask/action-checkout-and-setup@v1 | ||
with: | ||
is-high-risk-environment: false | ||
node-version: ${{ matrix.node-version }} | ||
- run: yarn lint | ||
- name: Validate RC changelog | ||
if: ${{ startsWith(github.head_ref, 'release/') }} | ||
run: yarn lint:changelog --rc | ||
- name: Validate changelog | ||
if: ${{ !startsWith(github.head_ref, 'release/') }} | ||
run: yarn lint:changelog | ||
- name: Require clean working directory | ||
shell: bash | ||
run: | | ||
if ! git diff --exit-code; then | ||
echo "Working tree dirty at end of job" | ||
exit 1 | ||
fi | ||
|
||
test: | ||
name: Test | ||
needs: prepare | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20.x, 22.x] | ||
steps: | ||
- name: Checkout and setup environment | ||
uses: MetaMask/action-checkout-and-setup@v1 | ||
with: | ||
is-high-risk-environment: false | ||
node-version: ${{ matrix.node-version }} | ||
- run: yarn test | ||
- name: Require clean working directory | ||
shell: bash | ||
run: | | ||
if ! git diff --exit-code; then | ||
echo "Working tree dirty at end of job" | ||
exit 1 | ||
fi | ||
|
||
compatibility-test: | ||
name: Compatibility test | ||
needs: prepare | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20.x, 22.x] | ||
steps: | ||
- name: Checkout and setup environment | ||
uses: MetaMask/action-checkout-and-setup@v1 | ||
with: | ||
is-high-risk-environment: false | ||
node-version: ${{ matrix.node-version }} | ||
- name: Install dependencies via Yarn | ||
run: rm yarn.lock && YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn | ||
- run: yarn test | ||
- name: Restore lockfile | ||
run: git restore yarn.lock | ||
- name: Require clean working directory | ||
shell: bash | ||
run: | | ||
if ! git diff --exit-code; then | ||
echo "Working tree dirty at end of job" | ||
exit 1 | ||
fi |
This file contains hidden or 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 hidden or 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,42 @@ | ||
name: Create Release Pull Request | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
base-branch: | ||
description: 'The base branch for git operations and the pull request.' | ||
default: 'main' | ||
required: true | ||
release-type: | ||
description: 'A SemVer version diff, i.e. major, minor, or patch. Mutually exclusive with "release-version".' | ||
required: false | ||
release-version: | ||
description: 'A specific version to bump to. Mutually exclusive with "release-type".' | ||
required: false | ||
|
||
jobs: | ||
create-release-pr: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- name: Checkout and setup environment | ||
uses: MetaMask/action-checkout-and-setup@v1 | ||
with: | ||
is-high-risk-environment: true | ||
|
||
# This is to guarantee that the most recent tag is fetched. This can | ||
# be configured to a more reasonable value by consumers. | ||
fetch-depth: 0 | ||
|
||
# We check out the specified branch, which will be used as the base | ||
# branch for all git operations and the release PR. | ||
ref: ${{ github.event.inputs.base-branch }} | ||
|
||
- uses: MetaMask/action-create-release-pr@v4 | ||
with: | ||
release-type: ${{ github.event.inputs.release-type }} | ||
release-version: ${{ github.event.inputs.release-version }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.