-
Notifications
You must be signed in to change notification settings - Fork 0
151 lines (129 loc) · 4.48 KB
/
release-production-plugins.yml
File metadata and controls
151 lines (129 loc) · 4.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
name: Release CLI Plugins (Production)
on:
push:
branches: [main]
workflow_dispatch: # manually trigger the workflow
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.28.0
- uses: actions/setup-node@v4
with:
node-version: '22.x'
- name: Enable Corepack
run: corepack enable
- name: Install pnpm
run: corepack prepare pnpm@10.28.0 --activate
- name: Clean the repository
run: pnpm run clean:all
- name: Install root dependencies
run: pnpm install --no-frozen-lockfile
- name: Build all plugins
run: pnpm -r --sort run build
- name: Reading Configuration
id: release_config
uses: rgarcia-phi/json-to-variables@v1.1.0
with:
filename: .github/config/release.json
prefix: release
# Variants
- name: Publishing variants (Production)
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-variants/package.json
tag: latest
# Export
- name: Publishing export (Production)
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-export/package.json
tag: latest
# Audit
- name: Publishing audit (Production)
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-audit/package.json
tag: latest
# Import
- name: Publishing import (Production)
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-import/package.json
tag: latest
# Clone
- name: Publishing clone (Production)
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-clone/package.json
tag: latest
# Import Setup
- name: Publishing import-setup (Production)
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-import-setup/package.json
tag: latest
# Export to CSV
- name: Publishing export to csv (Production)
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-export-to-csv/package.json
tag: latest
# Migration
- name: Publishing migration (Production)
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-migration/package.json
tag: latest
# Seed
- name: Publishing seed (Production)
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-seed/package.json
tag: latest
# Bootstrap
- name: Publishing bootstrap (Production)
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-bootstrap/package.json
tag: latest
# Bulk Publish
- name: Publishing bulk publish (Production)
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-bulk-publish/package.json
tag: latest
# Branches
- name: Publishing branches (Production)
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-branches/package.json
tag: latest
- name: Create Production Release
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.PKG_TOKEN }}
VERSION: ${{ steps.publish-plugins.outputs.version }}
run: |
# Get the previous production release for comparison
PREVIOUS_PROD=$(gh release list --limit 10 | grep -v 'prerelease' | head -1 | cut -f1)
if [ -n "$PREVIOUS_PROD" ]; then
gh release create "v${VERSION}" --title "Production Release $VERSION" --notes-from-tag "$PREVIOUS_PROD"
else
gh release create "v${VERSION}" --title "Production Release $VERSION" --generate-notes
fi