Skip to content

Commit b4e77c6

Browse files
authored
Merge next (#92)
* Start next branch (#91) * update * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * workflows * wip * wip * wip * wip * Fix go releaser tag * Fix tagging for next * Fix tagging
1 parent 47744f6 commit b4e77c6

19 files changed

Lines changed: 916 additions & 15 deletions

File tree

.github/workflows/cli.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ name: CLI
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [ main, next ]
66
paths:
77
- 'cli/**'
88
- 'examples/**'
99
- '.github/workflows/cli.yml'
1010
pull_request:
11-
branches: [ main ]
11+
branches: [ main, next ]
1212
paths:
1313
- 'cli/**'
1414
- 'examples/**'

.github/workflows/codecov.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Codecov
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [main, next]
66
pull_request:
7-
branches: [main]
7+
branches: [main, next]
88

99
jobs:
1010
coverage:

.github/workflows/installer-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ name: Installer Scripts
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [main, next]
66
paths:
77
- 'apps/web/public/install/**'
88
- '.github/workflows/installer-tests.yml'
99
pull_request:
10-
branches: [main]
10+
branches: [main, next]
1111
paths:
1212
- 'apps/web/public/install/**'
1313
- '.github/workflows/installer-tests.yml'
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Next Release
2+
3+
on:
4+
push:
5+
branches: [next]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
submodules: recursive
19+
20+
- uses: actions/setup-go@v5
21+
with:
22+
go-version: stable
23+
24+
- name: Calculate version and create tag
25+
id: version
26+
run: |
27+
# Get latest stable semver tag (v0.0.0 format, exclude -next tags)
28+
LATEST_TAG=$(git tag --list 'v*' --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -1)
29+
if [ -z "$LATEST_TAG" ]; then
30+
LATEST_TAG="v0.0.0"
31+
fi
32+
SHORT_HASH=$(git rev-parse --short HEAD)
33+
VERSION="${LATEST_TAG}-next.${SHORT_HASH}"
34+
echo "Latest stable tag: $LATEST_TAG"
35+
echo "HEAD commit: $SHORT_HASH"
36+
echo "Creating tag: $VERSION"
37+
echo "version=${VERSION}" >> $GITHUB_OUTPUT
38+
# Delete remote tag if it exists (in case of re-run)
39+
git push origin ":refs/tags/${VERSION}" 2>/dev/null || true
40+
git tag -f "$VERSION"
41+
git push origin "$VERSION"
42+
43+
- name: Run GoReleaser
44+
uses: goreleaser/goreleaser-action@v6
45+
with:
46+
version: "~> v2"
47+
args: release --clean --config .goreleaser.next.yaml
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
GORELEASER_CURRENT_TAG: ${{ steps.version.outputs.version }}
51+
52+
- uses: ./.github/actions/setup-vscode-extension
53+
54+
- name: Package VS Code extension
55+
run: pnpm package:extension
56+
57+
- name: Upload VS Code extension to release
58+
run: |
59+
VSIX_FILE=$(ls integrations/vscode/*.vsix 2>/dev/null | head -1)
60+
if [ -z "$VSIX_FILE" ]; then
61+
echo "Error: No .vsix file found. Did the build step succeed?"
62+
exit 1
63+
fi
64+
gh release upload "${{ steps.version.outputs.version }}" "$VSIX_FILE" --clobber
65+
env:
66+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,19 @@ jobs:
3636
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
3737
POSTHOG_API_HOST: https://us.i.posthog.com
3838
AUR_SSH_KEY: ${{ secrets.AUR_SSH_KEY }}
39+
40+
- uses: ./.github/actions/setup-vscode-extension
41+
42+
- name: Package VS Code extension
43+
run: pnpm package:extension
44+
45+
- name: Upload VS Code extension to release
46+
run: |
47+
VSIX_FILE=$(ls integrations/vscode/*.vsix 2>/dev/null | head -1)
48+
if [ -z "$VSIX_FILE" ]; then
49+
echo "Error: No .vsix file found. Did the build step succeed?"
50+
exit 1
51+
fi
52+
gh release upload "${{ github.ref_name }}" "$VSIX_FILE" --clobber
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/vscode-extension-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: VS Code Extension Build
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [ main, next ]
66
pull_request:
7-
branches: [ main ]
7+
branches: [ main, next ]
88
workflow_dispatch:
99

1010
jobs:

.github/workflows/web-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ name: Web Tests
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [ main, next ]
66
paths:
77
- 'apps/web/**'
88
- 'packages/**'
99
- 'cli/**'
1010
- '.github/workflows/web-tests.yml'
1111
pull_request:
12-
branches: [ main ]
12+
branches: [ main, next ]
1313
paths:
1414
- 'apps/web/**'
1515
- 'packages/**'

.goreleaser.next.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
version: 2
2+
project_name: yapi
3+
4+
builds:
5+
- id: yapi
6+
dir: cli
7+
main: ./cmd/yapi
8+
binary: yapi
9+
ldflags:
10+
- -s -w
11+
- -X main.version={{.Version}}
12+
- -X main.commit={{.ShortCommit}}
13+
- -X main.date={{.Date}}
14+
goos: [linux, darwin, windows]
15+
goarch: [amd64, arm64]
16+
17+
archives:
18+
- id: yapi_archive
19+
ids: [yapi]
20+
formats: [tar.gz]
21+
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
22+
files:
23+
- LICENSE
24+
format_overrides:
25+
- goos: windows
26+
formats: [zip]
27+
28+
checksum:
29+
name_template: checksums.txt
30+
31+
release:
32+
prerelease: true
33+
name_template: "Next {{ .Version }}"
34+
35+
changelog:
36+
disable: true

.pond.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pr_base_branch: next

.specify/templates/spec-template.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
## Overview
66

77
[1-2 sentences describing what this feature does]
8+
<!--
9+
Note 'users' can be end users of yapi, or the developers who maintain it.
10+
Make sure this is clear.
11+
-->
812

913
## User Stories
1014

0 commit comments

Comments
 (0)