|
1 |
| -name: Build and Release an SDK Generator |
| 1 | +name: Build and Test |
2 | 2 |
|
3 | 3 | on:
|
| 4 | + workflow_dispatch: |
| 5 | + workflow_call: |
4 | 6 | push:
|
5 |
| - branches: |
6 |
| - - main |
7 |
| - # FIXME drop this!! |
| 7 | + branches: [main] |
8 | 8 | pull_request:
|
9 |
| - branches: |
10 |
| - - main |
11 |
| - |
12 |
| -concurrency: |
13 |
| - group: ${{ github.workflow }}-${{ github.ref }} |
14 |
| - cancel-in-progress: true |
| 9 | + branches: [main] |
15 | 10 |
|
16 | 11 | jobs:
|
17 | 12 | build-jar:
|
@@ -93,112 +88,3 @@ jobs:
|
93 | 88 | with:
|
94 | 89 | name: build-${{ matrix.os }}
|
95 | 90 | path: ./aidbox-sdk-*
|
96 |
| - |
97 |
| - # -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- # |
98 |
| - |
99 |
| - create-release: |
100 |
| - name: Release new version |
101 |
| - runs-on: ubuntu-latest |
102 |
| - needs: [build-jar, build-native] |
103 |
| - permissions: |
104 |
| - contents: write |
105 |
| - |
106 |
| - steps: |
107 |
| - - uses: actions/checkout@v4 |
108 |
| - |
109 |
| - - name: Download artifacts |
110 |
| - uses: actions/download-artifact@v4 |
111 |
| - with: |
112 |
| - pattern: build-* |
113 |
| - path: release/ |
114 |
| - merge-multiple: true |
115 |
| - |
116 |
| - - name: Fetch all tags |
117 |
| - run: git fetch --tags |
118 |
| - |
119 |
| - - name: Determine next version |
120 |
| - id: next_version |
121 |
| - run: | |
122 |
| - # Get the latest tag |
123 |
| - latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`) |
124 |
| - echo "Latest tag: $latest_tag" |
125 |
| -
|
126 |
| - if [ -z "$latest_tag" ]; then |
127 |
| - next_version="v1" |
128 |
| - else |
129 |
| - # Parse the version number |
130 |
| - IFS='.' read -r -a version_parts <<< "${latest_tag:1}" |
131 |
| - major=${version_parts[0]} |
132 |
| - minor=${version_parts[1]} |
133 |
| - patch=${version_parts[2]} |
134 |
| -
|
135 |
| - # Increment the patch version |
136 |
| - patch=$((patch + 1)) |
137 |
| -
|
138 |
| - next_version="v$major.$minor.$patch" |
139 |
| - fi |
140 |
| -
|
141 |
| - echo "Next version: $next_version" |
142 |
| - echo "tag=$next_version" >> $GITHUB_OUTPUT |
143 |
| -
|
144 |
| - - name: Create a new tag |
145 |
| - run: | |
146 |
| - git tag ${{ steps.next_version.outputs.tag }} |
147 |
| - git push origin ${{ steps.next_version.outputs.tag }} |
148 |
| -
|
149 |
| - # FIXME this action is archived |
150 |
| - - name: Create Github Release |
151 |
| - id: create_release |
152 |
| - uses: actions/create-release@v1 |
153 |
| - env: |
154 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
155 |
| - with: |
156 |
| - tag_name: ${{ steps.next_version.outputs.tag }} |
157 |
| - release_name: Release ${{ steps.next_version.outputs.tag }} |
158 |
| - draft: false |
159 |
| - prerelease: false |
160 |
| - |
161 |
| - # FIXME this action is archived |
162 |
| - # FIXME do not enumarote files in reales manually |
163 |
| - - name: Upload Release Asset (jar) |
164 |
| - uses: actions/upload-release-asset@v1 |
165 |
| - env: |
166 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
167 |
| - with: |
168 |
| - upload_url: ${{ steps.create_release.outputs.upload_url }} |
169 |
| - asset_path: release/aidbox-sdk.jar |
170 |
| - asset_name: aidbox-sdk.jar |
171 |
| - asset_content_type: application/java-archive |
172 |
| - |
173 |
| - # FIXME this action is archived |
174 |
| - - name: Upload Release Asset (amd64) |
175 |
| - uses: actions/upload-release-asset@v1 |
176 |
| - env: |
177 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
178 |
| - with: |
179 |
| - upload_url: ${{ steps.create_release.outputs.upload_url }} |
180 |
| - asset_path: release/aidbox-sdk-ubuntu-latest |
181 |
| - asset_name: aidbox-sdk-linux |
182 |
| - asset_content_type: application/octet-stream |
183 |
| - |
184 |
| - # FIXME this action is archived |
185 |
| - - name: Upload Release Asset (arm64) |
186 |
| - uses: actions/upload-release-asset@v1 |
187 |
| - env: |
188 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
189 |
| - with: |
190 |
| - upload_url: ${{ steps.create_release.outputs.upload_url }} |
191 |
| - asset_path: release/aidbox-sdk-macos-latest |
192 |
| - asset_name: aidbox-sdk-macos-m1 |
193 |
| - asset_content_type: application/octet-stream |
194 |
| - |
195 |
| - # FIXME this action is archived |
196 |
| - - name: Upload Release Assets (Windows) |
197 |
| - uses: actions/upload-release-asset@v1 |
198 |
| - env: |
199 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
200 |
| - with: |
201 |
| - upload_url: ${{ steps.create_release.outputs.upload_url }} |
202 |
| - asset_path: release/aidbox-sdk-windows-latest.exe |
203 |
| - asset_name: aidbox-sdk-windows.exe |
204 |
| - asset_content_type: application/octet-stream |
0 commit comments