Skip to content

Commit

Permalink
Fix release-it CI
Browse files Browse the repository at this point in the history
  • Loading branch information
KillianH committed Jun 29, 2023
1 parent eb52f75 commit e7221b5
Show file tree
Hide file tree
Showing 9 changed files with 193 additions and 55 deletions.
28 changes: 10 additions & 18 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,6 @@ jobs:
- run: yarn install --immutable
- run: yarn build

- name: Build helper doc
run: cd packages/lib && yarn docs

- name: Deploy docs
if: ${{ github.event.inputs.dry == 'false' }}
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: packages/lib/docs

- name: NPM config
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
env:
Expand All @@ -57,18 +48,19 @@ jobs:
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Release lib
- name: Release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TYPE_ARG: ${{ fromJSON('{"auto":"", "patch":"--patch", "minor":"--minor", "major":"--major", "beta":"--preRelease=beta --npm.tag=next", "alpha":"--preRelease=alpha --npm.tag=next"}')[github.event.inputs.type] }}
DRY_ARG: ${{ github.event.inputs.dry == 'true' && '--dry-run' || '' }}
run: cd packages/lib && yarn run release --ci --no-git.requireUpstream --verbose $TYPE_ARG $DRY_ARG
run: yarn run release --ci --no-git.requireUpstream --verbose $TYPE_ARG $DRY_ARG

- name: Release snap
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TYPE_ARG: ${{ fromJSON('{"auto":"", "patch":"--patch", "minor":"--minor", "major":"--major", "beta":"--preRelease=beta --npm.tag=next", "alpha":"--preRelease=alpha --npm.tag=next"}')[github.event.inputs.type] }}
DRY_ARG: ${{ github.event.inputs.dry == 'true' && '--dry-run' || '' }}
run: cd packages/snap && yarn run release --ci --no-git.requireUpstream --verbose $TYPE_ARG $DRY_ARG
- name: Build helper doc
run: cd packages/lib && yarn docs

- name: Deploy docs
if: ${{ github.event.inputs.dry == 'false' }}
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: packages/lib/docs
26 changes: 25 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/snap-box",
"version": "1.0.0",
"version": "1.0.1",
"private": true,
"description": "",
"homepage": "https://github.com/MetaMask/snap-box#readme",
Expand All @@ -22,6 +22,7 @@
"lint:eslint": "eslint . --cache --ext js,ts",
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write",
"lint:misc": "prettier '**/*.json' '**/*.md' '!**/CHANGELOG.md' '**/*.yml' --ignore-path .gitignore",
"release": "release-it",
"start": "yarn workspaces foreach --parallel --interlaced --verbose run start",
"test": "yarn workspaces foreach --parallel --verbose run test"
},
Expand All @@ -31,6 +32,7 @@
"@metamask/eslint-config-nodejs": "10.0.0",
"@metamask/eslint-config-typescript": "10.0.0",
"@playwright/test": "1.34.3",
"@release-it-plugins/workspaces": "^3.2.0",
"@types/isomorphic-fetch": "0.0.36",
"@types/jest": "29.5.1",
"@typescript-eslint/eslint-plugin": "5.59.7",
Expand All @@ -45,11 +47,33 @@
"jest": "29.5.0",
"prettier": "2.8.8",
"prettier-plugin-packagejson": "2.4.3",
"release-it": "15.10.3",
"ts-jest": "29.1.0",
"typescript": "4.9.5"
},
"packageManager": "[email protected]",
"engines": {
"node": ">=16.0.0"
},
"release-it": {
"plugins": {
"@release-it-plugins/workspaces": {
"workspaces": [
"packages/snap",
"packages/lib"
]
}
},
"git": {
"requireCleanWorkingDir": false,
"commitMessage": "chore: release v${version}"
},
"hooks": {
"after:bump": "yarn build"
},
"npm": false,
"github": {
"release": true
}
}
}
7 changes: 1 addition & 6 deletions packages/lib/.release-it.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{
"git": {
"commitMessage": "chore: release v${version}"
},
"github": {
"release": true
}
"git": false
}
2 changes: 0 additions & 2 deletions packages/lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"lint:style": "eslint --color 'src/**/*.{js,ts,tsx}'",
"lint:style:fix": "yarn run lint:style --fix",
"lint:types": "tsc --noEmit --pretty",
"release": "release-it",
"test": "exit 0"
},
"dependencies": {
Expand All @@ -27,7 +26,6 @@
},
"devDependencies": {
"esdoc-typescript-plugin": "1.0.1",
"release-it": "15.10.3",
"typedoc": "0.23.28"
}
}
2 changes: 1 addition & 1 deletion packages/site/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "site",
"version": "0.0.0",
"version": "1.0.1",
"scripts": {
"lint": "eslint . --fix --ignore-path .gitignore",
"preview": "vite preview",
Expand Down
7 changes: 1 addition & 6 deletions packages/snap/.release-it.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{
"git": {
"commitMessage": "chore: release v${version}"
},
"github": {
"release": true
}
"git": false
}
4 changes: 1 addition & 3 deletions packages/snap/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "casper-manager",
"version": "1.0.0",
"version": "1.0.1",
"description": "Sign deploys and messages for the Casper Blockchain with your Casper account(s).",
"repository": {
"type": "git",
Expand All @@ -22,7 +22,6 @@
"lint:eslint": "eslint . --cache --ext js,ts",
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write",
"lint:misc": "prettier '**/*.json' '**/*.md' '!CHANGELOG.md' --ignore-path .gitignore",
"release": "release-it",
"serve": "mm-snap serve -p 9000",
"start": "mm-snap watch -p 9000",
"test": "jest --silent --runInBand"
Expand Down Expand Up @@ -59,7 +58,6 @@
"playwright": "1.34.3",
"prettier": "2.8.8",
"prettier-plugin-packagejson": "2.4.3",
"release-it": "15.10.3",
"rimraf": "3.0.2",
"ts-results": "npm:@casperlabs/[email protected]",
"typescript": "4.9.5"
Expand Down
4 changes: 2 additions & 2 deletions packages/snap/snap.manifest.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"version": "1.0.0",
"version": "1.0.1",
"description": "Sign deploys and messages for the Casper Blockchain with your Casper account(s).",
"proposedName": "Casper Manager",
"repository": {
"type": "git",
"url": "https://github.com/casper-ecosystem/casper-manager.git"
},
"source": {
"shasum": "+blJTL8qjV17C2yUh6H5IdkyVUC2bqf5fN0CAFRVrvA=",
"shasum": "sHQnOQPNY6fm3/bwuDQiWbIt6gV/ojvxI7gAvSx5IWM=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Loading

0 comments on commit e7221b5

Please sign in to comment.