@pixpilot/scaffoldfy-configs 0.42.0 → 0.43.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,11 @@
1
1
  # @pixpilot/scaffoldfy-configs
2
2
 
3
+ ## 0.43.0
4
+
5
+ ### Minor Changes
6
+
7
+ - add GitHub App token release workflow
8
+
3
9
  ## 0.42.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -24,6 +24,16 @@ Usage:
24
24
  npx @pixpilot/scaffoldfy@latest --config https://unpkg.com/@pixpilot/scaffoldfy-configs@latest/codeql-private-repo/scaffoldfy.json
25
25
  ```
26
26
 
27
+ ### github-action-release-app-token
28
+
29
+ Replaces the release workflow of a github-action-template clone with the GitHub App token variant (RELEASER_ID / RELEASER_PRIVATE_KEY) for pixpilot and ccpu repositories
30
+
31
+ Usage:
32
+
33
+ ```sh
34
+ npx @pixpilot/scaffoldfy@latest --config https://unpkg.com/@pixpilot/scaffoldfy-configs@latest/github-action-release-app-token/scaffoldfy.json
35
+ ```
36
+
27
37
  ### license-file
28
38
 
29
39
  Generate a LICENSE file with common open-source licenses
@@ -0,0 +1,50 @@
1
+ name: Release
2
+
3
+ on:
4
+ workflow_run:
5
+ workflows: [CI]
6
+ types:
7
+ - completed
8
+ branches:
9
+ - main
10
+
11
+ permissions:
12
+ contents: write
13
+
14
+ jobs:
15
+ release:
16
+ if: >-
17
+ ${{
18
+ github.event.workflow_run.conclusion == 'success' &&
19
+ github.event.workflow_run.event == 'push' &&
20
+ github.event.workflow_run.head_branch == 'main' &&
21
+ !contains(github.event.workflow_run.head_commit.message || '', '[skip ci]') &&
22
+ !contains(github.event.workflow_run.head_commit.message || '', '[ci skip]')
23
+ }}
24
+ runs-on: ubuntu-latest
25
+ steps:
26
+ - name: Generate token
27
+ id: generate-token
28
+ uses: actions/create-github-app-token@v3
29
+ with:
30
+ client-id: ${{ secrets.RELEASER_ID }}
31
+ private-key: ${{ secrets.RELEASER_PRIVATE_KEY }}
32
+
33
+ - name: Checkout
34
+ uses: actions/checkout@v4
35
+ with:
36
+ fetch-depth: 0
37
+ persist-credentials: false
38
+ ref: ${{ github.event.workflow_run.head_sha }}
39
+ token: ${{ steps.generate-token.outputs.token }}
40
+
41
+ - name: Setup Project
42
+ uses: pixpilot/github-actions/setup-pnpm-project@v1
43
+
44
+ - name: Build dist
45
+ run: npm run bundle
46
+
47
+ - name: Semantic Release
48
+ uses: cycjimmy/semantic-release-action@v4
49
+ env:
50
+ GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
@@ -0,0 +1,31 @@
1
+ {
2
+ "$schema": "../node_modules/@pixpilot/scaffoldfy/schema/scaffoldfy.schema.json",
3
+ "name": "github-action-release-app-token",
4
+ "description": "Replaces the release workflow of a github-action-template clone with the GitHub App token variant (RELEASER_ID / RELEASER_PRIVATE_KEY) for pixpilot and ccpu repositories",
5
+ "dependencies": ["pixpilot-info"],
6
+ "variables": [
7
+ {
8
+ "id": "isGithubActionTemplate",
9
+ "value": {
10
+ "type": "exec",
11
+ "value": "node -e \"try{process.stdout.write(String(require(require('path').resolve('package.json')).name==='github-action-template'))}catch{process.stdout.write('false')}\""
12
+ }
13
+ }
14
+ ],
15
+ "tasks": [
16
+ {
17
+ "id": "github-action-release-app-token-workflow",
18
+ "name": "Use GitHub App token in release workflow",
19
+ "description": "Overwrites the release workflow to authenticate semantic-release with a GitHub App token",
20
+ "enabled": {
21
+ "type": "condition",
22
+ "value": "isGithubActionTemplate === true && pixpilot_project === true"
23
+ },
24
+ "type": "write",
25
+ "config": {
26
+ "templateFile": "release.yml",
27
+ "file": ".github/workflows/release.yml"
28
+ }
29
+ }
30
+ ]
31
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pixpilot/scaffoldfy-configs",
3
3
  "type": "module",
4
- "version": "0.42.0",
4
+ "version": "0.43.0",
5
5
  "author": "PixPilot <m.doaie@hotmail.com>",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -29,11 +29,11 @@
29
29
  "devDependencies": {
30
30
  "@types/node": "^22.18.11",
31
31
  "eslint": "^9.38.0",
32
- "@internal/tsdown-config": "0.1.0",
33
32
  "@internal/eslint-config": "0.3.0",
34
33
  "@internal/vitest-config": "0.1.0",
35
- "@internal/prettier-config": "0.0.1",
36
- "@pixpilot/scaffoldfy": "0.56.0"
34
+ "@internal/tsdown-config": "0.1.0",
35
+ "@pixpilot/scaffoldfy": "0.56.0",
36
+ "@internal/prettier-config": "0.0.1"
37
37
  },
38
38
  "prettier": "@internal/prettier-config",
39
39
  "publishConfig": {