|
13 | 13 | - "v*" |
14 | 14 |
|
15 | 15 | jobs: |
16 | | - # Corresponsd to tests in tests.yml |
| 16 | + # Corresponds to tests in tests.yml |
17 | 17 | build-with-docker: |
18 | 18 | name: Build ${{ matrix.dockcross-only }} (Dockcross) |
19 | 19 | runs-on: ${{ matrix.os }} |
@@ -148,15 +148,14 @@ jobs: |
148 | 148 | if [ -n "$VERSION_INPUT" ]; then |
149 | 149 | RELEASE_VERSION="$VERSION_INPUT" |
150 | 150 | else |
151 | | - # Read version from build.gradle.kts or gradle.properties |
152 | | - RELEASE_VERSION=$(grep -E 'version\s*=' build.gradle.kts | sed -E 's/.*\"(.+)-SNAPSHOT\".*/\1/') |
| 151 | + RELEASE_VERSION=$(grep -E 'version\s*=' gradle.properties | sed -E 's/.*\"(.+)-SNAPSHOT\".*/\1/') |
153 | 152 | fi |
154 | 153 | echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV |
155 | 154 |
|
156 | 155 | - name: Remove -SNAPSHOT suffix (prepare release version) |
157 | 156 | if: ${{ github.event_name == 'workflow_dispatch' }} |
158 | 157 | run: | |
159 | | - sed -i -E "s/${RELEASE_VERSION}-SNAPSHOT/$RELEASE_VERSION/" build.gradle.kts gradle.properties || true |
| 158 | + sed -i -E "s/${RELEASE_VERSION}-SNAPSHOT/$RELEASE_VERSION/" gradle.properties || true |
160 | 159 | git config user.name "github-actions" |
161 | 160 | git config user.email "[email protected]" |
162 | 161 | git commit -am "chore: release $RELEASE_VERSION [skip ci]" |
@@ -213,11 +212,12 @@ jobs: |
213 | 212 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
214 | 213 |
|
215 | 214 | - name: Bump to next snapshot version |
| 215 | + if: ${{ github.event_name != 'workflow_dispatch' }} |
216 | 216 | run: | |
217 | 217 | # Bump minor version (for example) and append -SNAPSHOT for continued development |
218 | 218 | NEXT_VERSION=$(echo $RELEASE_VERSION | awk -F. '{$NF += 1; OFS="."; print $0}') # increment last segment |
219 | 219 | NEXT_VERSION="$NEXT_VERSION-SNAPSHOT" |
220 | | - sed -i -E "s/$RELEASE_VERSION/$NEXT_VERSION/" build.gradle.kts gradle.properties || true |
| 220 | + sed -i -E "s/$RELEASE_VERSION/$NEXT_VERSION/" gradle.properties || true |
221 | 221 | git config user.name "github-actions" |
222 | 222 | git config user.email "[email protected]" |
223 | 223 | git commit -am "chore: start next development cycle $NEXT_VERSION [skip ci]" |
|
0 commit comments