Skip to content
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

chore: 🤖 configure automated releases #4

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .ax.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"scopes": [
"sales",
"supply",
"production",
"store-app",
"shared"
],
"prefix": "my-org",
"appSuffix": "app"
}
4 changes: 4 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "scope:store-app",
"onlyDependOnLibsWithTags": ["scope:shared", "scope:store-app"]
},
{
"sourceTag": "scope:shared",
"onlyDependOnLibsWithTags": ["scope:shared"]
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ jobs:
with:
fetch-depth: 0
- uses: nrwl/nx-set-shas@v3
- run: npm ci

- run: npx nx format:check
- run: npx nx affected -t lint --parallel=3
- run: npx nx affected -t test --parallel=3 --configuration=ci
- run: npx nx affected -t build --parallel=3
- name: Install deps
run: npm ci
- name: Lint affected
run: npx nx affected -t lint
- name: Test affected
run: npx nx affected -t test --configuration=ci
- name: Build affected
run: npx nx affected -t build
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: RELEASE
on: [workflow_dispatch]
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: nrwl/nx-set-shas@v3
- name: Install deps
run: npm ci
- name: Lint
run: npx nx run-many -t lint
- name: Test
run: npx nx run-many -t test --configuration=ci
- name: Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ dist
tmp
/out-tsc
/dv-example/
.nx/

# dependencies
node_modules
Expand Down
Loading