code-foundry 0.15.0 → 0.17.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.
@@ -9,107 +9,10 @@ permissions:
9
9
  contents: write
10
10
  issues: write
11
11
  pull-requests: write
12
-
13
- env:
14
- REPO_FOUNDRY_PROFILE: ${{ vars.REPO_FOUNDRY_PROFILE }}
15
- REPO_FOUNDRY_LANGUAGES: ${{ vars.REPO_FOUNDRY_LANGUAGES }}
16
- REPO_FOUNDRY_FEATURES: ${{ vars.REPO_FOUNDRY_FEATURES }}
17
- REPO_FOUNDRY_PACKAGE_MANAGER: ${{ vars.REPO_FOUNDRY_PACKAGE_MANAGER }}
18
- REPO_FOUNDRY_RELEASE_TYPE: ${{ vars.REPO_FOUNDRY_RELEASE_TYPE }}
19
- REPO_FOUNDRY_NPM_PUBLISH: ${{ vars.REPO_FOUNDRY_NPM_PUBLISH }}
12
+ id-token: write
20
13
 
21
14
  jobs:
22
15
  release:
23
- name: Release / Version
24
- runs-on: ubuntu-slim
25
- timeout-minutes: 20
26
- concurrency:
27
- group: ${{ github.workflow }}-${{ github.ref }}
28
- cancel-in-progress: false
29
- outputs:
30
- release_created: ${{ steps.release.outputs.release_created || 'false' }}
31
- tag_name: ${{ steps.release.outputs.tag_name }}
32
- npm_publish: ${{ steps.profile.outputs.npm_publish }}
33
- steps:
34
- - name: Checkout
35
- uses: actions/checkout@v7
36
- with:
37
- # Release Please reads release metadata and manifests; defer source
38
- # blob transfer until a package file is actually needed.
39
- filter: blob:none
40
- - name: Detect release profile
41
- id: profile
42
- shell: bash
43
- run: |
44
- if [ -x .github/scripts/profile.sh ]; then
45
- release_type="$(bash .github/scripts/profile.sh get release_type)"
46
- npm_publish="$(bash .github/scripts/profile.sh get npm_publish)"
47
- else
48
- release_type="$(awk -F': ' '/^release_type:/ {print $2; exit}' .github/template.yml 2>/dev/null || true)"
49
- npm_publish="$(awk -F': ' '/^npm_publish:/ {print $2; exit}' .github/template.yml 2>/dev/null || true)"
50
- fi
51
- [ -n "$release_type" ] || release_type=auto
52
- [ -n "$npm_publish" ] || npm_publish=false
53
-
54
- if [ "$release_type" = auto ]; then
55
- if [ -f package.json ]; then release_type=node
56
- elif [ -f pyproject.toml ]; then release_type=python
57
- elif [ -f Cargo.toml ]; then release_type=rust
58
- elif [ -f version.txt ]; then release_type=simple
59
- else release_type=none
60
- fi
61
- fi
62
-
63
- case "$release_type" in
64
- node|python|rust|simple) ;;
65
- none) npm_publish=false ;;
66
- *) echo "Unsupported release_type: $release_type" >&2; exit 2 ;;
67
- esac
68
- if [ ! -f package.json ]; then npm_publish=false; fi
69
- printf 'release_type=%s\n' "$release_type" >> "$GITHUB_OUTPUT"
70
- printf 'npm_publish=%s\n' "$npm_publish" >> "$GITHUB_OUTPUT"
71
- - name: Release Please
72
- id: release
73
- if: steps.profile.outputs.release_type != 'none'
74
- uses: googleapis/release-please-action@v5
75
- with:
76
- # Use a PAT or GitHub App token when GITHUB_TOKEN cannot create PRs.
77
- token: ${{ secrets.RELEASE_PLEASE_TOKEN || github.token }}
78
- config-file: release-please-config.json
79
- release-type: ${{ steps.profile.outputs.release_type }}
80
-
81
- npm:
82
- name: Release / Publish npm
83
- needs: release
84
- if: needs.release.outputs.release_created == 'true' && needs.release.outputs.npm_publish == 'true'
85
- runs-on: ubuntu-slim
86
- timeout-minutes: 15
87
- permissions:
88
- contents: read
89
- id-token: write
90
- env:
91
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
92
- steps:
93
- - name: Checkout release
94
- uses: actions/checkout@v7
95
- with:
96
- ref: ${{ needs.release.outputs.tag_name }}
97
- - name: Setup Node (trusted)
98
- if: env.NPM_TOKEN == ''
99
- uses: actions/setup-node@v5
100
- with:
101
- node-version: 24
102
- - name: Setup Node (token)
103
- if: env.NPM_TOKEN != ''
104
- uses: actions/setup-node@v5
105
- with:
106
- node-version: 24
107
- registry-url: https://registry.npmjs.org
108
- - name: Publish npm with token
109
- if: env.NPM_TOKEN != ''
110
- env:
111
- NODE_AUTH_TOKEN: ${{ env.NPM_TOKEN }}
112
- run: npm publish --provenance --access public
113
- - name: Publish npm with trusted publishing
114
- if: env.NPM_TOKEN == ''
115
- run: npm publish --provenance --access public
16
+ name: Release
17
+ uses: 0xPlayerOne/code-foundry/.github/workflows/reusable-release.yml@v0.16.0
18
+ secrets: inherit
@@ -0,0 +1,110 @@
1
+ name: Code Foundry Release
2
+
3
+ on:
4
+ workflow_call:
5
+
6
+ permissions:
7
+ contents: write
8
+ issues: write
9
+ pull-requests: write
10
+
11
+ env:
12
+ REPO_FOUNDRY_PROFILE: ${{ vars.REPO_FOUNDRY_PROFILE }}
13
+ REPO_FOUNDRY_LANGUAGES: ${{ vars.REPO_FOUNDRY_LANGUAGES }}
14
+ REPO_FOUNDRY_FEATURES: ${{ vars.REPO_FOUNDRY_FEATURES }}
15
+ REPO_FOUNDRY_PACKAGE_MANAGER: ${{ vars.REPO_FOUNDRY_PACKAGE_MANAGER }}
16
+ REPO_FOUNDRY_RELEASE_TYPE: ${{ vars.REPO_FOUNDRY_RELEASE_TYPE }}
17
+ REPO_FOUNDRY_NPM_PUBLISH: ${{ vars.REPO_FOUNDRY_NPM_PUBLISH }}
18
+
19
+ jobs:
20
+ release:
21
+ name: Release / Version
22
+ runs-on: ubuntu-slim
23
+ timeout-minutes: 20
24
+ concurrency:
25
+ group: ${{ github.workflow }}-${{ github.ref }}
26
+ cancel-in-progress: false
27
+ outputs:
28
+ release_created: ${{ steps.release.outputs.release_created || 'false' }}
29
+ tag_name: ${{ steps.release.outputs.tag_name }}
30
+ npm_publish: ${{ steps.profile.outputs.npm_publish }}
31
+ steps:
32
+ - name: Checkout
33
+ uses: actions/checkout@v7
34
+ with:
35
+ filter: blob:none
36
+ - name: Detect release profile
37
+ id: profile
38
+ shell: bash
39
+ run: |
40
+ if [ -x .github/scripts/profile.sh ]; then
41
+ release_type="$(bash .github/scripts/profile.sh get release_type)"
42
+ npm_publish="$(bash .github/scripts/profile.sh get npm_publish)"
43
+ else
44
+ release_type="$(awk -F': ' '/^release_type:/ {print $2; exit}' .github/template.yml 2>/dev/null || true)"
45
+ npm_publish="$(awk -F': ' '/^npm_publish:/ {print $2; exit}' .github/template.yml 2>/dev/null || true)"
46
+ fi
47
+ [ -n "$release_type" ] || release_type=auto
48
+ [ -n "$npm_publish" ] || npm_publish=false
49
+
50
+ if [ "$release_type" = auto ]; then
51
+ if [ -f package.json ]; then release_type=node
52
+ elif [ -f pyproject.toml ]; then release_type=python
53
+ elif [ -f Cargo.toml ]; then release_type=rust
54
+ elif [ -f version.txt ]; then release_type=simple
55
+ else release_type=none
56
+ fi
57
+ fi
58
+
59
+ case "$release_type" in
60
+ node|python|rust|simple) ;;
61
+ none) npm_publish=false ;;
62
+ *) echo "Unsupported release_type: $release_type" >&2; exit 2 ;;
63
+ esac
64
+ if [ ! -f package.json ]; then npm_publish=false; fi
65
+ printf 'release_type=%s\n' "$release_type" >> "$GITHUB_OUTPUT"
66
+ printf 'npm_publish=%s\n' "$npm_publish" >> "$GITHUB_OUTPUT"
67
+ - name: Release Please
68
+ id: release
69
+ if: steps.profile.outputs.release_type != 'none'
70
+ uses: googleapis/release-please-action@v5
71
+ with:
72
+ token: ${{ secrets.RELEASE_PLEASE_TOKEN || github.token }}
73
+ config-file: release-please-config.json
74
+ release-type: ${{ steps.profile.outputs.release_type }}
75
+
76
+ npm:
77
+ name: Release / Publish npm
78
+ needs: release
79
+ if: needs.release.outputs.release_created == 'true' && needs.release.outputs.npm_publish == 'true'
80
+ runs-on: ubuntu-slim
81
+ timeout-minutes: 15
82
+ permissions:
83
+ contents: read
84
+ id-token: write
85
+ env:
86
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
87
+ steps:
88
+ - name: Checkout release
89
+ uses: actions/checkout@v7
90
+ with:
91
+ ref: ${{ needs.release.outputs.tag_name }}
92
+ - name: Setup Node (trusted)
93
+ if: env.NPM_TOKEN == ''
94
+ uses: actions/setup-node@v5
95
+ with:
96
+ node-version: 24
97
+ - name: Setup Node (token)
98
+ if: env.NPM_TOKEN != ''
99
+ uses: actions/setup-node@v5
100
+ with:
101
+ node-version: 24
102
+ registry-url: https://registry.npmjs.org
103
+ - name: Publish npm with token
104
+ if: env.NPM_TOKEN != ''
105
+ env:
106
+ NODE_AUTH_TOKEN: ${{ env.NPM_TOKEN }}
107
+ run: npm publish --provenance --access public
108
+ - name: Publish npm with trusted publishing
109
+ if: env.NPM_TOKEN == ''
110
+ run: npm publish --provenance --access public
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.17.0](https://github.com/0xPlayerOne/code-foundry/compare/v0.16.0...v0.17.0) (2026-07-28)
4
+
5
+
6
+ ### Features
7
+
8
+ * **release:** document centralized release runtime ([3e2a3f9](https://github.com/0xPlayerOne/code-foundry/commit/3e2a3f9b5e71bf5003819aa177afd265d989bb34))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **release:** grant trusted publishing permission ([025f78e](https://github.com/0xPlayerOne/code-foundry/commit/025f78e851d44a60e2e4e17d3718b0b2fbe147ae))
14
+
15
+ ## [0.16.0](https://github.com/0xPlayerOne/code-foundry/compare/v0.15.0...v0.16.0) (2026-07-28)
16
+
17
+
18
+ ### Features
19
+
20
+ * **release:** add reusable release workflow runtime ([19c3433](https://github.com/0xPlayerOne/code-foundry/commit/19c3433af4ae1ed796030da77f07309e2bf3e98c))
21
+
3
22
  ## [0.15.0](https://github.com/0xPlayerOne/code-foundry/compare/v0.14.0...v0.15.0) (2026-07-28)
4
23
 
5
24
 
package/README.md CHANGED
@@ -55,6 +55,11 @@ CodeQL is also independently reusable through the same contract. It retains
55
55
  GitHub's native security-event permissions and language-specific analysis while
56
56
  keeping CodeQL separate from CI and dependency security checks.
57
57
 
58
+ Release automation follows the same model: the consumer keeps a short
59
+ main-branch wrapper while the shared runtime handles Release Please, GitHub
60
+ release metadata, optional npm publication, provenance, and token/trusted
61
+ publishing fallback.
62
+
58
63
  Initialization defaults to AGPL for new repositories. Synchronization defaults
59
64
  to `--license preserve`, so an existing repository's license is never replaced
60
65
  unless you explicitly select a license or provide `--license-file`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "code-foundry",
3
- "version": "0.15.0",
3
+ "version": "0.17.0",
4
4
  "description": "A fast, language-aware repository factory for agent-ready workflows, testing, security, and release automation.",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-or-later",