@@ -16,31 +16,35 @@ jobs:
1616 test :
1717 runs-on : ubuntu-latest
1818 steps :
19- - uses : actions/checkout@v4
20- - name : Set up Go
21- uses : actions/setup-go@v4
22- with :
23- go-version : ' 1.22.3'
24- - name : Run tests
25- run : go test -v ./...
26- - name : Run integration test
27- run : |
28- go build -o xsd2code ./cmd
29- ./xsd2code -xsd=docs/TC6_XML_V10_B.xsd -output=tc6_xml_v10_b.go -package=test -json
30-
19+ - uses : actions/checkout@v4
20+
21+ - name : Set up Go
22+ uses : actions/setup-go@v4
23+ with :
24+ go-version : 1.22
25+
26+ - name : Run tests
27+ run : go test -v ./...
28+
29+ - name : Run integration test
30+ run : |
31+ go build -o xsd2code ./cmd
32+ ./xsd2code -xsd=docs/TC6_XML_V10_B.xsd -output=tc6_xml_v10_b.go -package=test -json
3133 release :
3234 needs : test
3335 runs-on : ubuntu-latest
3436 if : startsWith(github.ref, 'refs/tags/v')
35- steps :
36- - uses : actions/checkout@v4
37- - name : Set up Go
38- uses : actions/setup-go@v4
39- with :
40- go-version : ' 1.22.3'
41-
42- - name : Build for multiple platforms
43- run : |
37+
38+ steps :
39+ - uses : actions/checkout@v4
40+
41+ - name : Set up Go
42+ uses : actions/setup-go@v4
43+ with :
44+ go-version : 1.22
45+
46+ - name : Build for multiple platforms
47+ run : |
4448 set -e # Exit on any error
4549 mkdir -p dist
4650
@@ -147,56 +151,66 @@ jobs:
147151 else
148152 echo "No artifacts were built successfully!"
149153 fi
150-
151- - name : Create Release
152- uses : softprops/action-gh-release@v1
153- with :
154- files : dist/*
155- generate_release_notes : true
156- draft : false
157- prerelease : false
158- body : |
159- ## XSD2Code ${{ github.ref_name }} 🚀
160-
161- 通用XSD到多语言代码转换工具 - 新版本发布!
162-
163- ### 📦 下载说明
164-
165- 选择适合您系统的版本:
166-
167- | 操作系统 | 架构 | 下载文件 |
168- |---------|------|----------|
169- | **Windows** | x64 | `xsd2code-${{ github.ref_name }}-windows-amd64.zip` |
170- | **Windows** | x86 | `xsd2code-${{ github.ref_name }}-windows-386.zip` |
171- | **Windows** | ARM64 | `xsd2code-${{ github.ref_name }}-windows-arm64.zip` |
172- | **Linux** | x64 | `xsd2code-${{ github.ref_name }}-linux-amd64.tar.gz` |
173- | **Linux** | ARM64 | `xsd2code-${{ github.ref_name }}-linux-arm64.tar.gz` |
174- | **macOS** | Intel | `xsd2code-${{ github.ref_name }}-darwin-amd64.tar.gz` |
175- | **macOS** | Apple Silicon | `xsd2code-${{ github.ref_name }}-darwin-arm64.tar.gz` |
176-
177- ### 🛡️ 安全验证
178-
179- 使用 `SHA256SUMS.txt` 文件验证下载的文件完整性:
180-
181- ```bash
182- # Linux/macOS
183- sha256sum -c SHA256SUMS.txt
184-
185- # Windows (PowerShell)
186- Get-FileHash filename.zip -Algorithm SHA256
187- ```
188-
189- ### 🚀 快速开始
190-
191- ```bash
192- # 下载并解压后
193- ./xsd2code -xsd=your-schema.xsd -lang=go -output=generated.go
194- ```
195-
196- 更多使用方法请查看 [文档](https://github.com/suifei/xsd2code/wiki)
197-
198- ### 📋 完整更新日志
199-
200- 详细的更新内容请查看 [CHANGELOG.md](https://github.com/suifei/xsd2code/blob/main/CHANGELOG.md)
201- env :
202- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
154+
155+ # - name: Create Release
156+ # uses: softprops/action-gh-release@v1
157+ # with:
158+ # files: dist/*
159+ # generate_release_notes: true
160+ # draft: false
161+ # prerelease: false
162+ # env:
163+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
164+
165+ - name : Create Release
166+ uses : softprops/action-gh-release@v1
167+ with :
168+ files : dist/*
169+ generate_release_notes : true
170+ draft : false
171+ prerelease : false
172+ body : |
173+ ## XSD2Code ${{ github.ref_name }} 🚀
174+
175+ 通用XSD到多语言代码转换工具 - 新版本发布!
176+
177+ ### 📦 下载说明
178+
179+ 选择适合您系统的版本:
180+
181+ | 操作系统 | 架构 | 下载文件 |
182+ |---------|------|----------|
183+ | **Windows** | x64 | `xsd2code-${{ github.ref_name }}-windows-amd64.zip` |
184+ | **Windows** | x86 | `xsd2code-${{ github.ref_name }}-windows-386.zip` |
185+ | **Windows** | ARM64 | `xsd2code-${{ github.ref_name }}-windows-arm64.zip` |
186+ | **Linux** | x64 | `xsd2code-${{ github.ref_name }}-linux-amd64.tar.gz` |
187+ | **Linux** | ARM64 | `xsd2code-${{ github.ref_name }}-linux-arm64.tar.gz` |
188+ | **macOS** | Intel | `xsd2code-${{ github.ref_name }}-darwin-amd64.tar.gz` |
189+ | **macOS** | Apple Silicon | `xsd2code-${{ github.ref_name }}-darwin-arm64.tar.gz` |
190+
191+ ### 🛡️ 安全验证
192+
193+ 使用 `SHA256SUMS.txt` 文件验证下载的文件完整性:
194+
195+ ```bash
196+ # Linux/macOS
197+ sha256sum -c SHA256SUMS.txt
198+
199+ # Windows (PowerShell)
200+ Get-FileHash filename.zip -Algorithm SHA256
201+ ```
202+
203+ ### 🚀 快速开始
204+
205+ ```bash
206+ # 下载并解压后
207+ ./xsd2code -xsd=your-schema.xsd -lang=go -output=generated.go
208+ ```
209+
210+ 更多使用方法请查看 [文档](https://github.com/suifei/xsd2code/wiki)
211+
212+ ### 📋 完整更新日志
213+
214+ 详细的更新内容请查看 [CHANGELOG.md](https://github.com/suifei/xsd2code/blob/main/CHANGELOG.md)
215+ env :
216+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments