@pixpilot/scaffoldfy-configs 0.39.1 → 0.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @pixpilot/scaffoldfy-configs
2
2
 
3
+ ## 0.40.0
4
+
5
+ ### Minor Changes
6
+
7
+ - add GitHub Packages release workflow
8
+
9
+ ## 0.39.2
10
+
11
+ ### Patch Changes
12
+
13
+ - remove outdated dependency checks from tests
14
+
3
15
  ## 0.39.1
4
16
 
5
17
  ### Patch Changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pixpilot/scaffoldfy-configs",
3
3
  "type": "module",
4
- "version": "0.39.1",
4
+ "version": "0.40.0",
5
5
  "author": "PixPilot <m.doaie@hotmail.com>",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -30,10 +30,10 @@
30
30
  "@types/node": "^22.18.11",
31
31
  "eslint": "^9.38.0",
32
32
  "@internal/eslint-config": "0.3.0",
33
- "@internal/tsdown-config": "0.1.0",
33
+ "@internal/prettier-config": "0.0.1",
34
34
  "@internal/vitest-config": "0.1.0",
35
35
  "@pixpilot/scaffoldfy": "0.55.1",
36
- "@internal/prettier-config": "0.0.1"
36
+ "@internal/tsdown-config": "0.1.0"
37
37
  },
38
38
  "prettier": "@internal/prettier-config",
39
39
  "publishConfig": {
@@ -0,0 +1,64 @@
1
+ # .github/workflows/release.yml
2
+
3
+ name: Release Package
4
+
5
+ on:
6
+ push:
7
+ branches:
8
+ - main
9
+ - next
10
+ workflow_dispatch:
11
+
12
+ jobs:
13
+ ci:
14
+ name: Run CI Checks
15
+ uses: ./.github/workflows/ci.yml
16
+
17
+ release:
18
+ name: Create Release and Publish
19
+ runs-on: ubuntu-latest
20
+ needs: ci
21
+ permissions:
22
+ contents: write
23
+ pull-requests: write
24
+ # Publishing targets GitHub Packages (publishConfig.registry in each
25
+ # package.json), which authenticates with a token rather than npm OIDC
26
+ # trusted publishing.
27
+ packages: write
28
+
29
+ steps:
30
+ - name: Generate bot app token
31
+ id: app_token
32
+ uses: actions/create-github-app-token@v2
33
+ with:
34
+ app-id: ${{ secrets.RELEASER_ID }}
35
+ private-key: ${{ secrets.RELEASER_PRIVATE_KEY }}
36
+
37
+ - name: Checkout repository
38
+ uses: actions/checkout@v4
39
+ with:
40
+ fetch-depth: 0
41
+ token: ${{ steps.app_token.outputs.token }}
42
+
43
+ - name: Setup project
44
+ uses: ./.github/actions/setup-project
45
+ with:
46
+ registry-url: 'https://npm.pkg.github.com'
47
+ # setup-node defaults the scope to the repository owner. Left to that
48
+ # default it would send @pixpilot-private packages to npmjs, and
49
+ # redirect the public @pixpilot packages this repo consumes to GitHub
50
+ # Packages — breaking both the publish and the install.
51
+ scope: '@pixpilot-private'
52
+ build: 'false'
53
+
54
+ - name: Release
55
+ uses: pixpilot/changesets-autopilot@v1
56
+ with:
57
+ GITHUB_TOKEN: ${{ steps.app_token.outputs.token }}
58
+ # The app token rather than secrets.GITHUB_TOKEN: the latter only
59
+ # grants package writes for the repository's own owner, and this
60
+ # publishes under a different scope. The app must be installed on
61
+ # @pixpilot-private with write:packages.
62
+ REGISTRY_TOKEN: ${{ steps.app_token.outputs.token }}
63
+ # npm provenance attestation is not supported by npm.pkg.github.com.
64
+ provenance: 'false'
@@ -3,18 +3,47 @@
3
3
  "description": "Pixpilot workspace package generator template for pnpm + Turbo monorepo. Provides project info prompts and config tasks.",
4
4
  "name": "github-pixpilot-owner-changesets-release",
5
5
  "dependencies": ["pixpilot-info"],
6
+ "prompts": [
7
+ {
8
+ "id": "releaseToGitHubPackages",
9
+ "type": "confirm",
10
+ "message": "Publish packages privately to GitHub Packages under @pixpilot-private? (No = npmjs)",
11
+ "default": false,
12
+ "enabled": {
13
+ "type": "condition",
14
+ "value": "is_pixpilot_organization === true"
15
+ }
16
+ }
17
+ ],
6
18
  "tasks": [
7
19
  {
8
20
  "id": "pixpilot-admin-changesets-release-create",
9
21
  "name": "Setup Changesets Release Workflow",
10
22
  "description": "Adds a GitHub Actions workflow for Changesets-based releases",
11
- "enabled": { "type": "condition", "value": "pixpilot_project == true" },
23
+ "enabled": {
24
+ "type": "condition",
25
+ "value": "pixpilot_project == true && releaseToGitHubPackages != true"
26
+ },
12
27
  "type": "write",
13
28
  "config": {
14
29
  "templateFile": "release.yml",
15
30
  "file": ".github/workflows/release.yml"
16
31
  }
17
32
  },
33
+ {
34
+ "id": "pixpilot-admin-changesets-release-create-github-packages",
35
+ "name": "Setup Changesets Release Workflow (GitHub Packages)",
36
+ "description": "Adds a Changesets release workflow publishing to GitHub Packages under @pixpilot-private instead of npmjs",
37
+ "enabled": {
38
+ "type": "condition",
39
+ "value": "pixpilot_project == true && releaseToGitHubPackages == true"
40
+ },
41
+ "type": "write",
42
+ "config": {
43
+ "templateFile": "release-github-packages.yml",
44
+ "file": ".github/workflows/release.yml"
45
+ }
46
+ },
18
47
  {
19
48
  "id": "changesets-release-cleanup",
20
49
  "name": "Cleanup Changesets Release Workflow",
@@ -191,9 +191,6 @@ describe('workspace-generator setup script', () => {
191
191
  expect(
192
192
  fs.readFileSync(path.join(workspaceDirectory, 'pnpm-workspace.yaml'), 'utf8'),
193
193
  ).toContain(' template-dependency: ^1.0.0');
194
- expect(
195
- fs.readFileSync(path.join(workspaceDirectory, 'pnpm-workspace.yaml'), 'utf8'),
196
- ).toContain(' "typescript-eslint": ^2.0.0');
197
194
  expect(fs.readFileSync(path.join(workspaceDirectory, 'pnpm-lock.yaml'), 'utf8')).toBe(
198
195
  'lock',
199
196
  );