Skip to content

Commit 24add37

Browse files
committed
fix: automate releases
1 parent aacbcda commit 24add37

File tree

3 files changed

+21
-16
lines changed

3 files changed

+21
-16
lines changed

.github/workflows/validate.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -148,19 +148,19 @@ jobs:
148148
run: npm run build
149149

150150
- name: 🚀 Release
151-
run: echo "TODO..."
152-
# uses: cycjimmy/semantic-release-action@v2
153-
# with:
154-
# semantic_version: 17
155-
# branches: |
156-
# [
157-
# '+([0-9])?(.{+([0-9]),x}).x',
158-
# 'main',
159-
# 'next',
160-
# 'next-major',
161-
# {name: 'beta', prerelease: true},
162-
# {name: 'alpha', prerelease: true}
163-
# ]
164-
# env:
165-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
166-
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
151+
uses: cycjimmy/semantic-release-action@v2
152+
with:
153+
working_directory: ./packages/workshop-app
154+
semantic_version: 17
155+
branches: |
156+
[
157+
'+([0-9])?(.{+([0-9]),x}).x',
158+
'main',
159+
'next',
160+
'next-major',
161+
{name: 'beta', prerelease: true},
162+
{name: 'alpha', prerelease: true}
163+
]
164+
env:
165+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
166+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

packages/workshop-app/bin/kcdshop.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ if (argv[0] !== 'start') {
1414
if (process.env.NODE_ENV === 'production' || isPublished) {
1515
exec('npm run start', {
1616
KCDSHOP_CONTEXT_CWD: process.env.KCDSHOP_CONTEXT_CWD ?? process.cwd(),
17+
NODE_ENV: 'production',
1718
}).catch(code => {
1819
process.exit(code)
1920
})

packages/workshop-app/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"name": "@kentcdodds/workshop-app",
3+
"version": "0.0.0-semantically-released",
34
"sideEffects": false,
5+
"publishConfig": {
6+
"access": "public"
7+
},
48
"bin": {
59
"kcdshop": "./bin/kcdshop.js"
610
},

0 commit comments

Comments
 (0)