Skip to content

Commit 4a9bab6

Browse files
carlrannabergclaude
andcommitted
fix: copy working workflows from autoagent
- Replace custom workflows with proven working versions from autoagent - Update package-specific references (stm CLI, simple-task-master package) - Fix YAML indentation issues This ensures reliable automated releases based on version changes in package.json 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 285b522 commit 4a9bab6

2 files changed

Lines changed: 26 additions & 42 deletions

File tree

.github/workflows/release.yaml

Lines changed: 19 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ jobs:
3030
version: ${{ steps.check.outputs.version }}
3131

3232
steps:
33-
- name: Checkout repository
33+
- name: Checkout repository
3434
uses: actions/checkout@v4
3535
with:
3636
fetch-depth: 0
3737

38-
- name: Check if version changed
38+
- name: Check if version changed
3939
id: check
4040
run: |
4141
# Get current version from package.json
@@ -52,35 +52,32 @@ jobs:
5252
echo "version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
5353
fi
5454
55-
test:
56-
name: Run Tests
57-
needs: check-version
58-
if: needs.check-version.outputs.should-release == 'true'
59-
uses: ./.github/workflows/test.yaml
60-
6155
release:
6256
name: Build and Publish
63-
needs: [check-version, test]
57+
needs: check-version
6458
if: needs.check-version.outputs.should-release == 'true'
6559
runs-on: ubuntu-latest
6660

6761
steps:
68-
- name: Checkout repository
62+
- name: Checkout repository
6963
uses: actions/checkout@v4
7064

71-
- name: Setup Node.js
65+
- name: Setup Node.js
7266
uses: actions/setup-node@v4
7367
with:
74-
node-version: 20.x
68+
node-version: 22.x
7569
registry-url: 'https://registry.npmjs.org'
7670

77-
- name: Install dependencies
78-
run: npm ci
71+
- name: Install dependencies
72+
run: npm install
73+
74+
- name: Run tests
75+
run: npm test
7976

80-
- name: Build package
77+
- name: Build package
8178
run: npm run build
8279

83-
- name: Validate build output
80+
- name: Validate build output
8481
run: |
8582
# Check that dist directory exists and contains files
8683
if [ ! -d "dist" ] || [ -z "$(ls -A dist)" ]; then
@@ -108,20 +105,20 @@ jobs:
108105
109106
echo "Build validation passed ✓"
110107
111-
- name: Create release tag
108+
- name: Create release tag
112109
run: |
113110
VERSION=${{ needs.check-version.outputs.version }}
114111
git config --global user.name "github-actions[bot]"
115112
git config --global user.email "github-actions[bot]@users.noreply.github.com"
116113
git tag -a "v$VERSION" -m "Release v$VERSION"
117114
git push origin "v$VERSION"
118115
119-
- name: Publish to npm
120-
run: npm publish --provenance
116+
- name: Publish to npm
117+
run: npm publish
121118
env:
122119
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
123120

124-
- name: Create GitHub Release
121+
- name: Create GitHub Release
125122
uses: actions/create-release@v1
126123
env:
127124
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -136,22 +133,11 @@ jobs:
136133
npm install -g simple-task-master@${{ needs.check-version.outputs.version }}
137134
```
138135
139-
### Usage
140-
```bash
141-
stm init
142-
stm add "My new task"
143-
stm list
144-
```
145-
146136
### What's Changed
147137
Please see the [changelog](https://github.com/${{ github.repository }}/compare/v${{ needs.check-version.outputs.version }}...HEAD) for details.
148138
149139
### Full Changelog
150140
https://github.com/${{ github.repository }}/commits/v${{ needs.check-version.outputs.version }}
151-
152-
---
153-
154-
🤖 Generated with [Claude Code](https://claude.ai/code)
155141
draft: false
156142
prerelease: false
157143

@@ -162,10 +148,10 @@ jobs:
162148
runs-on: ubuntu-latest
163149

164150
steps:
165-
- name: Checkout repository
151+
- name: Checkout repository
166152
uses: actions/checkout@v4
167153

168-
- name: Notify on failure
154+
- name: Notify on failure
169155
if: failure()
170156
run: |
171157
echo "::error::Release failed! Please check the logs and fix any issues."

.github/workflows/version-bump.yaml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,28 @@ jobs:
2828
runs-on: ubuntu-latest
2929

3030
steps:
31-
- name: Checkout repository
31+
- name: Checkout repository
3232
uses: actions/checkout@v4
3333
with:
3434
token: ${{ secrets.GITHUB_TOKEN }}
3535

36-
- name: Setup Node.js
36+
- name: Setup Node.js
3737
uses: actions/setup-node@v4
3838
with:
39-
node-version: 20.x
39+
node-version: 22.x
40+
4041

41-
- name: Configure Git
42+
- name: Configure Git
4243
run: |
4344
git config --global user.name "github-actions[bot]"
4445
git config --global user.email "github-actions[bot]@users.noreply.github.com"
4546
46-
- name: Bump version
47+
- name: Bump version
4748
id: bump
4849
run: |
4950
# Get current version
5051
CURRENT_VERSION=$(node -p "require('./package.json').version")
5152
echo "Current version: $CURRENT_VERSION"
52-
echo "current-version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
5353
5454
# Bump version based on input
5555
if [ "${{ inputs.version-type }}" == "prerelease" ]; then
@@ -63,7 +63,7 @@ jobs:
6363
echo "New version: $NEW_VERSION"
6464
echo "new-version=$NEW_VERSION" >> $GITHUB_OUTPUT
6565
66-
- name: Create Pull Request
66+
- name: Create Pull Request
6767
uses: peter-evans/create-pull-request@v6
6868
with:
6969
token: ${{ secrets.GITHUB_TOKEN }}
@@ -85,8 +85,6 @@ jobs:
8585
8686
---
8787
*This PR was automatically created by the Version Bump workflow.*
88-
89-
🤖 Generated with [Claude Code](https://claude.ai/code)
9088
branch: version-bump-${{ steps.bump.outputs.new-version }}
9189
delete-branch: true
9290
labels: |

0 commit comments

Comments
 (0)