Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adapt package to latest module template standards (#249)
* Adapt package to latest module template standards * Update prettier and run lint:fix * Add a repository entry to package.json * Add lint:changelogs script * Remove lint:changelogs from lint script * Fix suggestions
- Loading branch information
Showing
13 changed files
with
438 additions
and
163 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 |
---|---|---|
@@ -1,14 +1,9 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
indent_size = 4 | ||
trim_trailing_whitespace = false | ||
insert_final_newline = 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,71 @@ | ||
name: Publish Release | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
workflow_call: | ||
|
||
jobs: | ||
publish-release: | ||
permissions: | ||
contents: write | ||
if: | | ||
github.event.pull_request.merged == true && | ||
startsWith(github.event.pull_request.head.ref, 'release/') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
# We check out the release pull request's base branch, which will be | ||
# used as the base branch for all git operations. | ||
ref: ${{ github.event.pull_request.base.ref }} | ||
- name: Get Node.js version | ||
id: nvm | ||
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc) | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ steps.nvm.outputs.NODE_VERSION }} | ||
- uses: MetaMask/action-publish-release@v1 | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.sha }} | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
- uses: MetaMask/action-publish-release@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Install | ||
run: yarn install | ||
- uses: actions/cache@v3 | ||
id: restore-build | ||
with: | ||
path: | | ||
./node_modules/.yarn-state.yml | ||
key: ${{ github.sha }} | ||
|
||
publish-npm-dry-run: | ||
runs-on: ubuntu-latest | ||
needs: publish-release | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.sha }} | ||
- uses: actions/cache@v3 | ||
id: restore-build | ||
with: | ||
path: | | ||
./node_modules/.yarn-state.yml | ||
key: ${{ github.sha }} | ||
- name: Dry Run Publish | ||
# omit npm-token token to perform dry run publish | ||
uses: MetaMask/action-npm-publish@v2 | ||
env: | ||
SKIP_PREPACK: true | ||
|
||
publish-npm: | ||
environment: npm-publish | ||
runs-on: ubuntu-latest | ||
needs: publish-npm-dry-run | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.sha }} | ||
- uses: actions/cache@v3 | ||
id: restore-build | ||
with: | ||
path: | | ||
./node_modules/.yarn-state.yml | ||
key: ${{ github.sha }} | ||
- name: Publish | ||
uses: MetaMask/action-npm-publish@v2 | ||
with: | ||
# This `NPM_TOKEN` needs to be manually set per-repository. | ||
# Look in the repository settings under "Environments", and set this token in the `npm-publish` environment. | ||
npm-token: ${{ secrets.NPM_TOKEN }} | ||
env: | ||
SKIP_PREPACK: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
*.lerna_backup | ||
*.har | ||
.DS_Store | ||
dist/ | ||
build-artifacts/ | ||
./packages/**/yarn.lock | ||
coverage/ | ||
docs/ | ||
|
||
# Logs | ||
logs | ||
|
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.