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

feat: update nx and release workflows #128

Merged
merged 94 commits into from
Oct 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
bb7660e
feat: :arrow_up: upgrade to nx 20
DavideSegullo Oct 25, 2024
ce90e00
fix: :rotating_light: fix lint errors
DavideSegullo Oct 25, 2024
05c157e
chore: :arrow_up: upgrade vitest
DavideSegullo Oct 25, 2024
9bd9beb
Merge pull request #113 from nabla-studio/davidesegullo/upgrade-nx
DavideSegullo Oct 25, 2024
318ec94
refactor(chain-registry): :fire: remove old chain-registry
DavideSegullo Oct 25, 2024
522a9ba
Merge pull request #114 from nabla-studio/davidesegullo/remove-registry
DavideSegullo Oct 25, 2024
e2aaa58
feat: :wrench: replace pnpm with bun
DavideSegullo Oct 26, 2024
481073c
ci: :construction_worker: update build system with bun
DavideSegullo Oct 26, 2024
4ba6450
Merge pull request #115 from nabla-studio/davidesegullo/migrate-to-bun
DavideSegullo Oct 26, 2024
9f2c3f7
ci: :green_heart: add new nx release system
DavideSegullo Oct 26, 2024
7b65add
ci: :construction_worker: add debug
DavideSegullo Oct 26, 2024
c251342
ci: :construction_worker: add release using programmatic api
DavideSegullo Oct 26, 2024
ca4886e
ci: :construction_worker: add environment
DavideSegullo Oct 26, 2024
00bc079
ci: :construction_worker: add release env log
DavideSegullo Oct 26, 2024
2bbcf75
ci: :green_heart: fix yaml format
DavideSegullo Oct 26, 2024
b3d911d
ci: :green_heart: fix env gen
DavideSegullo Oct 26, 2024
56a3858
ci: :green_heart: remove process args
DavideSegullo Oct 26, 2024
18ab147
ci: :construction_worker: add action environment vars
DavideSegullo Oct 26, 2024
b183965
ci: :construction_worker: add release preid, specifier and tag
DavideSegullo Oct 26, 2024
161f662
ci: :construction_worker: add release worflow for preview and prod
DavideSegullo Oct 26, 2024
579c4b9
refactor: :fire: remove old actions
DavideSegullo Oct 26, 2024
a0be46a
Merge pull request #117 from nabla-studio/davidesegullo/ci-new_releas…
DavideSegullo Oct 26, 2024
9d9c756
ci: :construction_worker: add release author
DavideSegullo Oct 26, 2024
920d313
Merge pull request #118 from nabla-studio/davidesegullo/fix-release
DavideSegullo Oct 26, 2024
4445b08
chore(release): publish
Oct 26, 2024
84db229
ci: :construction_worker: add npm provenance
DavideSegullo Oct 26, 2024
4b40897
ci: :construction_worker: use npm token only when required
DavideSegullo Oct 26, 2024
4925ff3
docs(nuxt): :memo: update readme
DavideSegullo Oct 26, 2024
90b3c55
fix(nuxt): :memo: add missing link
DavideSegullo Oct 26, 2024
5cd92af
Merge pull request #119 from nabla-studio/davidesegullo/fix-npm
DavideSegullo Oct 26, 2024
4230865
ci: :green_heart: add missing write permissions
DavideSegullo Oct 26, 2024
f52778e
fix(next): :memo: add missing link
DavideSegullo Oct 26, 2024
c4d20d7
Merge pull request #120 from nabla-studio/davidesegullo/fix-permissions
DavideSegullo Oct 26, 2024
dce20ba
chore(release): publish
Oct 26, 2024
45c2f3a
ci: :construction_worker: add release publish in another step
DavideSegullo Oct 26, 2024
c98d495
fix(wallet-registry): :memo: update readme
DavideSegullo Oct 26, 2024
31b674f
fix: :rotating_light: fix linter error
DavideSegullo Oct 26, 2024
c4e2397
ci: :construction_worker: add release publish dryrun check
DavideSegullo Oct 26, 2024
1720404
Merge pull request #121 from nabla-studio/davidesegullo/fix-publish
DavideSegullo Oct 26, 2024
12bdaae
chore(release): publish
Oct 26, 2024
f7476f7
ci: :green_heart: use npx insteead of bunx for publish
DavideSegullo Oct 26, 2024
11b642c
fix: :rotating_light: fix lint errors
DavideSegullo Oct 26, 2024
fa19cac
Merge pull request #122 from nabla-studio/davidesegullo/fix-publish_npm
DavideSegullo Oct 26, 2024
f809fc1
chore(release): publish
Oct 26, 2024
9502cf6
ci: :construction_worker: specify registry url
DavideSegullo Oct 26, 2024
441d76a
fix(nuxt): :memo: update readme
DavideSegullo Oct 26, 2024
2a8dadb
Merge pull request #123 from nabla-studio/davidesegullo/fix-node_setup
DavideSegullo Oct 26, 2024
3c0a22a
chore(release): publish
Oct 26, 2024
03fee38
fix: :wrench: fix correlated deps update
DavideSegullo Oct 26, 2024
b7cc750
chore: :wrench: change root project package name
DavideSegullo Oct 26, 2024
06e53da
ci: :construction_worker: add artifacts upload
DavideSegullo Oct 26, 2024
05d6c1d
ci: :construction_worker: add artifact path
DavideSegullo Oct 26, 2024
4d8e137
ci: :construction_worker: add packageRoot for nx release
DavideSegullo Oct 26, 2024
86bfb58
Merge pull request #124 from nabla-studio/davidesegullo/fix-correlated
DavideSegullo Oct 26, 2024
4c5387d
chore(release): publish
Oct 26, 2024
50b6b59
chore: :wrench: add registry version resolver and workspace
DavideSegullo Oct 26, 2024
0b6f981
chore: :wrench: enable packageRoot again
DavideSegullo Oct 26, 2024
d5d2a52
chore: :wrench: add git tag resolver
DavideSegullo Oct 26, 2024
220e267
fix(react-native): :memo: update readme
DavideSegullo Oct 26, 2024
0707330
chore: :wrench: revert pnpm replace with bun
DavideSegullo Oct 26, 2024
24a67c9
fix(vue): :rotating_light: fix lint config
DavideSegullo Oct 26, 2024
a2931eb
fix(vue): :rotating_light: fix lint
DavideSegullo Oct 26, 2024
1dd6e82
Merge pull request #125 from nabla-studio/davidesegullo/fix-projectroot
DavideSegullo Oct 26, 2024
5b7b8c6
fix: :bug: remove bunx for husky
DavideSegullo Oct 26, 2024
5c68fb6
Merge pull request #126 from nabla-studio/davidesegullo/fix-bun
DavideSegullo Oct 26, 2024
4b092c8
chore(release): publish
Oct 26, 2024
ee48eea
ci: :construction_worker: add artifacts upload
DavideSegullo Oct 26, 2024
8babe18
chore(release): publish
Oct 26, 2024
b105167
fix: :wrench: remove version from package.json
DavideSegullo Oct 26, 2024
720816e
chore(release): publish
Oct 26, 2024
feeb819
fix: :green_heart: better build
DavideSegullo Oct 26, 2024
75d7067
chore(release): publish
Oct 26, 2024
f1b80d2
fix: :green_heart: revert version remove
DavideSegullo Oct 26, 2024
b31bd96
ci: :green_heart: fix build
DavideSegullo Oct 26, 2024
3cb0c63
ci: :green_heart: fix git config
DavideSegullo Oct 26, 2024
649687b
ci: :green_heart: disable lockfile update
DavideSegullo Oct 26, 2024
e0355d7
chore(release): publish
Oct 26, 2024
2f44cd4
chore(release): publish
Oct 26, 2024
56a8d28
ci: :green_heart: enable lock update
DavideSegullo Oct 26, 2024
d88e561
fix: :bug: fix file linking
DavideSegullo Oct 26, 2024
ab2fdc3
chore(release): publish
Oct 26, 2024
e3a126a
chore(release): publish
Oct 26, 2024
e128d32
fix: :rotating_light: fix build and lint
DavideSegullo Oct 26, 2024
1bc4bf3
fix: :bug: fix lock file
DavideSegullo Oct 26, 2024
984b92e
chore(release): publish
Oct 26, 2024
e2f9103
chore(release): publish
Oct 26, 2024
15b7b8b
fix: :bug: fix packageRoot
DavideSegullo Oct 26, 2024
151681b
chore: :wrench: add workspace specifier
DavideSegullo Oct 26, 2024
093c19a
chore(release): publish
Oct 26, 2024
ce3c74d
chore: :wrench: change packageRoot
DavideSegullo Oct 26, 2024
e59640f
chore(release): publish
Oct 26, 2024
9026084
chore(release): publish
Oct 26, 2024
ccc506e
ci: :construction_worker: add base and head ref
DavideSegullo Oct 27, 2024
98c003d
ci: :construction_worker: use base_ref instead of ref_name
DavideSegullo Oct 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 20 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx", "*.vue"],
"rules": {
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-empty-interface": "off",
"@nx/enforce-module-boundaries": [
"error",
{
Expand All @@ -24,12 +28,26 @@
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"rules": {}
"rules": {
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-extra-semi": "error",
"@typescript-eslint/no-empty-interface": "off",
"no-extra-semi": "off"
}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
"rules": {
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-extra-semi": "error",
"@typescript-eslint/no-empty-interface": "off",
"no-extra-semi": "off"
}
}
]
}
24 changes: 0 additions & 24 deletions .github/actions/release/action.yml

This file was deleted.

67 changes: 0 additions & 67 deletions .github/actions/setup/action.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/actions/test/action.yml

This file was deleted.

82 changes: 82 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: PR Checks (Dry-Run)

on:
pull_request:

jobs:
checks:
runs-on: ubuntu-latest
environment: ${{ github.base_ref == 'main' && 'production' || github.base_ref == 'v1' && 'production' || 'preview' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_PREID: ${{ vars.RELEASE_PREID }}
CUSTOM_BASE_REF: ${{ github.base_ref }}
CUSTOM_REF_NAME: ${{ github.ref_name }}
CUSTOM_HEAD_REF: ${{ github.head_ref }}
RELEASE_SPECIFIER: ${{ vars.RELEASE_SPECIFIER }}
RELEASE_TAG: ${{ vars.RELEASE_TAG }}

steps:
# Step 1: Check out the repository code
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch the entire history to allow proper versioning

# Step 2: Setup pnpm package manager
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false

# Step 3: Set up Node.js environment
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: Cache dependencies
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.OS }}-20.x-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-20.x-

# Step 5: Install dependencies
- name: Install dependencies
run: pnpm i --frozen-lockfile

# Step 6: Set SHAs for nx workspace
- name: Set SHAs for Nx workspace
uses: nrwl/nx-set-shas@v4

# Step 7: Run the build for the affected changes
- name: Run Nx lint, test and build
run: pnpx nx affected -t lint test build --exclude nextjs,vue3

# Step 8: Run the release in dry-run mode
- name: Run Nx release version (dry-run)
run: pnpm release

# Step 9: Run publish in dry-run mode
- name: Publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
# Use npx instead of yarn because yarn automagically sets NPM_* environment variables
# like NPM_CONFIG_REGISTRY so npm publish ends up ignoring the .npmrc file
# which is set up by `setup-node` action.
run: pnpx nx release publish --verbose --dry-run

# Step 10: Upload artifacts
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
path: './dist'

# Step 11: Clean up dist directory
- name: Cleanup dist directory
run: rm -rf ./dist # Remove the dist directory to start fresh
89 changes: 89 additions & 0 deletions .github/workflows/release-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Release

on:
push:
branches:
- next

jobs:
release:
runs-on: ubuntu-latest
environment: preview
permissions:
contents: write
id-token: write # needed for provenance data generation
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_PREID: ${{ vars.RELEASE_PREID }}
RELEASE_SPECIFIER: ${{ vars.RELEASE_SPECIFIER }}
RELEASE_TAG: ${{ vars.RELEASE_TAG }}

steps:
# Step 1: Check out the repository code
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch the entire history to allow proper versioning

# Step 2: Setup pnpm package manager
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false

# Step 3: Set up Node.js environment
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'

- name: Cache dependencies
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.OS }}-20.x-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-20.x-

# Step 5: Install dependencies
- name: Install dependencies
run: pnpm i --frozen-lockfile

# Step 6: Set SHAs for nx workspace
- name: Set SHAs for Nx workspace
uses: nrwl/nx-set-shas@v4

# Step 7: Run the build for the affected changes
- name: Run Nx lint, test and build
run: pnpx nx affected -t lint test build --exclude nextjs,vue3

# Step 8: Set github authour
- name: Setup git user to "🤖 nabla bot"
run: git config user.email "-" && git config user.name "🤖 nabla bot"

# Step 9: Run the release
- name: Run Nx release version
run: pnpm release -d false

# Step 10: Run the build for the affected changes
- name: Run build
run: pnpm build

# Step 11: Run publish
- name: Publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
# Use npx instead of yarn because yarn automagically sets NPM_* environment variables
# like NPM_CONFIG_REGISTRY so npm publish ends up ignoring the .npmrc file
# which is set up by `setup-node` action.
run: npx nx release publish --verbose --tag $RELEASE_TAG

# Step 12: Upload artifacts
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
path: './dist'
Loading
Loading