Skip to content

Commit

Permalink
Merge pull request #130 from nabla-studio/next
Browse files Browse the repository at this point in the history
ci: 💚 add missing env var for prod release
  • Loading branch information
DavideSegullo authored Oct 27, 2024
2 parents 3a4ba92 + c48a4a6 commit dfe533b
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 23 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,19 @@ jobs:
- 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 7: Run lint and test for the affected changes
- name: Run Nx lint and test
run: pnpx nx affected -t lint test --exclude nextjs,vue3

# Step 8: Run the release in dry-run mode
# Step 8: Run the build for the affected changes
- name: Run build
run: pnpm build

# Step 9: 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
# Step 10: Run publish in dry-run mode
- name: Publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand All @@ -71,12 +75,12 @@ jobs:
# which is set up by `setup-node` action.
run: pnpx nx release publish --verbose --dry-run

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

# Step 11: Clean up dist directory
# Step 12: Clean up dist directory
- name: Cleanup dist directory
run: rm -rf ./dist # Remove the dist directory to start fresh
20 changes: 12 additions & 8 deletions .github/workflows/release-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,27 @@ jobs:
- 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 7: Run lint and test for the affected changes
- name: Run Nx lint and test
run: pnpx nx affected -t lint test --exclude nextjs,vue3

# Step 8: Set github authour
# Step 8: Run the build for the affected changes
- name: Run build
run: pnpm build

# Step 9: 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
# Step 10: Run the release
- name: Run Nx release version
run: pnpm release -d false

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

# Step 11: Run publish
# Step 12: Run publish
- name: Publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand All @@ -82,7 +86,7 @@ jobs:
# which is set up by `setup-node` action.
run: npx nx release publish --verbose --tag $RELEASE_TAG

# Step 12: Upload artifacts
# Step 13: Upload artifacts
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
Expand Down
23 changes: 15 additions & 8 deletions .github/workflows/release-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
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
Expand Down Expand Up @@ -54,23 +57,27 @@ jobs:
- 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 7: Run lint and test for the affected changes
- name: Run Nx lint and test
run: pnpx nx affected -t lint test --exclude nextjs,vue3

# Step 8: Set github authour
# Step 8: Run the build for the affected changes
- name: Run build
run: pnpm build

# Step 9: 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
# Step 10: Run the release
- name: Run Nx release version
run: pnpm release -d false

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

# Step 11: Run publish
# Step 12: Run publish
- name: Publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand All @@ -80,7 +87,7 @@ jobs:
# which is set up by `setup-node` action.
run: pnpx nx release publish --verbose

# Step 12: Upload artifacts
# Step 13: Upload artifacts
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit dfe533b

Please sign in to comment.