Skip to content

Commit

Permalink
ci(github): setup release workflow to publish to Github Packages
Browse files Browse the repository at this point in the history
  • Loading branch information
ivangabriele committed Nov 14, 2022
1 parent 39b4eb6 commit dd960b5
Show file tree
Hide file tree
Showing 127 changed files with 546 additions and 1,079 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ jobs:
run: yarn semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# TODO Check if both are really needed.
NPM_TOKEN: ${{ secrets.GH_PAT }}
NODE_AUTH_TOKEN: ${{ secrets.GH_PAT }}
- name: Get version
id: get_version
run: echo ::set-output name=version::$(npm pkg get version | sed 's/"//g')
Expand Down
63 changes: 63 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"branches": [
"main",
{
"name": "beta",
"prerelease": true
},
{
"name": "alpha",
"prerelease": true
}
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"releaseRules": [
{
"type": "build",
"scope": "deps",
"release": "patch"
},
{
"type": "chore",
"scope": "deps",
"release": "patch"
},
{
"type": "docs",
"release": "patch"
},
{
"type": "feat",
"release": "minor"
},
{
"type": "refactor",
"release": "patch"
},
{
"type": "style",
"release": "patch"
}
]
}
],
[
"@semantic-release/exec",
{
"prepareCmd": "npm version --no-git-tag-version ${nextRelease.version} && yarn"
}
],
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
[
"@semantic-release/npm",
{
"pkgRoot": "./dist"
}
],
"@semantic-release/github"
]
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/del-npm-6.0.0-fb1f14b406-5742891627.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,17 @@
"@ivangabriele/commitlint-config": "1.0.6",
"@ivangabriele/eslint-config-typescript-react": "4.3.0",
"@ivangabriele/prettier-config": "3.1.0",
"@ivangabriele/semantic-release-config-dist": "2.1.0",
"@jest/globals": "29.2.0",
"@rollup/plugin-commonjs": "23.0.0",
"@rollup/plugin-node-resolve": "15.0.0",
"@rollup/plugin-replace": "5.0.0",
"@rollup/plugin-typescript": "8.5.0",
"@semantic-release/changelog": "6.0.1",
"@semantic-release/commit-analyzer": "9.0.2",
"@semantic-release/exec": "6.0.3",
"@semantic-release/github": "8.0.6",
"@semantic-release/npm": "9.0.1",
"@semantic-release/release-notes-generator": "10.0.3",
"@storybook/addon-actions": "6.5.12",
"@storybook/addon-essentials": "6.5.12",
"@storybook/addon-links": "6.5.12",
Expand Down Expand Up @@ -83,7 +88,6 @@
"eslint-plugin-sort-destructure-keys": "1.4.0",
"eslint-plugin-sort-keys-fix": "1.1.2",
"eslint-plugin-typescript-sort-keys": "2.1.0",
"esm-path": "1.0.1",
"gh-pages": "4.0.0",
"husky": "8.0.1",
"jest": "29.2.0",
Expand All @@ -94,12 +98,12 @@
"prettier": "2.7.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-feather": "2.0.10",
"react-is": "18.2.0",
"rollup": "2.79.1",
"rollup-plugin-peer-deps-external": "2.2.4",
"rollup-plugin-postcss": "4.0.2",
"rollup-plugin-sizes": "1.0.4",
"semantic-release": "19.0.5",
"styled-components": "5.3.6",
"typescript": "4.8.4",
"webpack": "5.74.0"
Expand All @@ -117,8 +121,5 @@
"bash -c 'npm run test:type:partial'"
]
},
"packageManager": "yarn@3.2.4",
"release": {
"extends": "@ivangabriele/semantic-release-config-dist"
}
"packageManager": "yarn@3.2.4"
}
5 changes: 3 additions & 2 deletions scripts/build/generatePackageJson.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ const distPackageExtraProps = {
url: 'https://github.com/MTES-MCT/monitor-ui/issues'
},
exports: './index.js',
funding: 'https://github.com/MTES-MCT/monitor-ui?sponsor=1',
homepage: 'https://mtes-mct.github.io/monitor-ui/',
name: '@mtes-mct/monitor-ui',
publishConfig: {
access: 'public'
access: 'public',
registry: 'https://npm.pkg.github.com',
tag: 'latest'
},
repository: {
type: 'git',
Expand Down
Loading

0 comments on commit dd960b5

Please sign in to comment.