11[tools ]
22dprint = " latest"
3- bun = " latest"
3+ action-validator = " latest"
44github-cli = " latest"
55
66[tasks .format ]
7+ alias = " fmt"
78description = " Format code using dprint"
89run = " dprint fmt"
910
10- [tasks .check ]
11- description = " Check code formatting and run all validations (like CI)"
12- run = [
13- " echo '=== Checking code formatting with dprint ==='" ,
14- " dprint check" ,
15- " echo '=== Validating action.yml ==='" ,
16- " bunx @action-validator/core action.yml" ,
17- " echo '=== All checks completed ==='" ,
18- ]
11+ [tasks ."lint:config" ]
12+ description = " Check code formatting of toml, json, yaml, ..."
13+ run = " dprint check"
14+
15+ [tasks ."lint:action_yaml" ]
16+ description = " Validating action.yml"
17+ run = " action-validator action.yml"
18+
19+ [tasks .lint ]
20+ description = " Run all lint"
21+ depends = [" lint:*" ]
1922
2023[tasks .ci ]
2124description = " Run all CI checks locally"
22- alias = " check "
25+ depends = [ " lint " ]
2326
2427[tasks .release ]
25- description = " Create a new release with version tag (usage: mise run release -- v1.2.3)"
26- depends = [" check" ]
28+ description = " Create a new release with version tag (usage: mise run release v1.2.3)"
2729run = '''
28- if [ -z "$1" ]; then
29- echo 'Error: Please provide version (e.g., mise run release -- v1.2.3)'
30+ VERSION="{{arg(name="version")}}"
31+
32+ if [ -z "$VERSION" ]; then
33+ echo 'Error: Please provide version (e.g., mise run release v1.2.3)'
3034 exit 1
3135 fi
32-
33- VERSION="$1"
36+
3437 MAJOR_VERSION=$(echo $VERSION | cut -d. -f1)
35-
38+
3639 echo "=== Creating GitHub Action release ==="
3740 echo "Version: $VERSION (major: $MAJOR_VERSION)"
38-
41+
3942 # Ensure we're on main branch and up to date
4043 git checkout main
4144 git pull origin main
42-
45+
4346 # Create and push version tag
4447 echo "Creating tag: $VERSION"
4548 git tag -a "$VERSION" -m "Release $VERSION"
4649 git push origin "$VERSION"
47-
50+
4851 # Create GitHub release using gh CLI
4952 echo "Creating GitHub release"
5053 gh release create "$VERSION" \
51- --title "Release $VERSION" \
52- --notes "## Changes
53-
54- See [CHANGELOG.md](https://github.com/cdviz-dev/send-cdevents/blob/main/CHANGELOG.md) for details.
55-
56- ## Usage
57-
58- \`\`\`yaml
59- - name: Send CDEvent
60- uses: cdviz-dev/send-cdevents@$VERSION
61- with:
62- data: |
63- {
64- \"context\": {
65- \"version\": \"0.4.1\",
66- \"source\": \"github-actions\",
67- \"type\": \"dev.cdevents.taskrun.started.0.2.0\"
68- },
69- \"subject\": {
70- \"id\": \"\${{ github.run_id }}\",
71- \"type\": \"taskRun\",
72- \"content\": {
73- \"taskName\": \"ci-build\"
74- }
75- }
76- }
77- url: \"https://your-webhook-endpoint.com/cdevents\"
78- \`\`\`"
79-
80- # Update major version tag (e.g., v1)
54+ --generate-notes
55+
56+ # Update major version tag (e.g., v1)
8157 echo "Updating major version tag: $MAJOR_VERSION"
8258 git tag -f -a "$MAJOR_VERSION" -m "Release $MAJOR_VERSION (latest: $VERSION)"
8359 git push origin "$MAJOR_VERSION" --force
84-
60+
8561 echo "=== Release completed! ==="
8662 echo "✅ Created version tag: $VERSION"
8763 echo "✅ Created GitHub release: $VERSION"
88- echo "✅ Updated major tag: $MAJOR_VERSION"
64+ echo "✅ Updated major tag: $MAJOR_VERSION"
8965 echo "📦 GitHub Marketplace will auto-update from the major version tag"
9066'''
9167
@@ -96,10 +72,10 @@ run = '''
9672 echo "=== Current Release Status ==="
9773 echo "Latest tags:"
9874 git tag --sort=-version:refname | head -5
99-
75+
10076 echo "Current branch:"
10177 git branch --show-current
102-
78+
10379 echo "Uncommitted changes:"
10480 git status --porcelain || echo "Working tree clean"
105- '''
81+ '''
0 commit comments