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

ci: 💚 remove prerelease and workflow env #135

Merged
merged 4 commits into from
Oct 29, 2024
Merged
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: 2 additions & 9 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,8 @@ on:
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
Expand Down Expand Up @@ -63,7 +56,7 @@ jobs:

# Step 9: Run the release in dry-run mode
- name: Run Nx release version (dry-run)
run: pnpm release
run: pnpm exec nx release --first-release --skip-publish --dry-run

# Step 10: Run publish in dry-run mode
- name: Publish
Expand All @@ -73,7 +66,7 @@ jobs:
# 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
run: pnpx nx release publish --first-release --verbose --dry-run

# Step 11: Upload artifacts
- name: Upload artifacts
Expand Down
93 changes: 0 additions & 93 deletions .github/workflows/release-preview.yml

This file was deleted.

8 changes: 2 additions & 6 deletions .github/workflows/release-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,11 @@ on:
jobs:
release:
runs-on: ubuntu-latest
environment: production
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
Expand Down Expand Up @@ -71,7 +67,7 @@ jobs:

# Step 10: Run the release
- name: Run Nx release version
run: pnpm release -d false
run: pnpm exec nx release --first-release --skip-publish

# Step 11: Run the build for the affected changes
- name: Run build
Expand All @@ -85,7 +81,7 @@ jobs:
# 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
run: pnpx nx release publish --first-release --verbose --tag

# Step 13: Upload artifacts
- name: Upload artifacts
Expand Down
16 changes: 4 additions & 12 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,13 @@
"release": {
"projects": ["packages/*"],
"projectsRelationship": "independent",
"git": {
"commit": true
},
"version": {
"git": {
"commit": true
},
"generatorOptions": {
"currentVersionResolver": "git-tag",
"specifierSource": "conventional-commits",
"fallbackCurrentVersionResolver": "disk",
"updateDependents": "auto"
}
"conventionalCommits": true
},
"changelog": {
"git": {
"commit": true
},
"projectChangelogs": {
"createRelease": "github"
},
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"build": "nx run-many --target=build --exclude nextjs,vue3 --parallel=6",
"test": "nx run-many --target=test --exclude nextjs,vue3 --parallel=6",
"lint": "nx run-many --target=lint --exclude nextjs,vue3 --parallel=6",
"release": "node tools/scripts/release.js",
"prepare": "husky install"
},
"private": true,
Expand Down
53 changes: 0 additions & 53 deletions tools/scripts/release.js

This file was deleted.