Skip to content

Commit ea6e2d6

Browse files
authored
Merge pull request #2811 from mapfish/fix-publish
Fix publish
2 parents c55f432 + c1126b2 commit ea6e2d6

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

.github/workflows/main.yaml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,16 @@ jobs:
4545
if: env.HAS_SECRETS == 'HAS_SECRETS'
4646

4747
- id: tag
48-
run: echo "##[set-output name=tag;]$(echo ${{ github.ref }}|sed 's%refs/tags/%%g')"
48+
run: echo "tag=$(echo ${{ github.ref }}|sed 's%refs/tags/%%g')" >> $GITHUB_OUTPUT
4949
if: startsWith(github.ref, 'refs/tags/')
5050
- run: sed --in-place 's/version=.*/version=${{ steps.tag.outputs.tag }}/g' gradle.properties
5151
if: startsWith(github.ref, 'refs/tags/')
5252

5353
- id: last-tag
54-
run: echo "##[set-output name=tag;]$(git describe --tags --abbrev=0)"
54+
run: echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
5555
if: "!startsWith(github.ref, 'refs/tags/')"
5656
- id: no-tag
57-
run: echo "##[set-output name=nb;]$(git log --oneline ${{ steps.last-tag.outputs.tag }}..HEAD|wc -l)"
57+
run: echo "nb=$(git log --oneline ${{ steps.last-tag.outputs.tag }}..HEAD|wc -l)" >> $GITHUB_OUTPUT
5858
if: "!startsWith(github.ref, 'refs/tags/')"
5959
- run: sed --in-place 's/version=.*/version=${{ steps.last-tag.outputs.tag }}/g' gradle.properties
6060
if: "!startsWith(github.ref, 'refs/tags/') && steps.no-tag.outputs.nb == 0"
@@ -63,7 +63,7 @@ jobs:
6363
}}/g' gradle.properties
6464
if: "!startsWith(github.ref, 'refs/tags/') && steps.no-tag.outputs.nb > 0"
6565
- id: date
66-
run: echo echo "##[set-output name=date;]$(date +%Y%m%d.%H%M%S)"
66+
run: echo echo "date=$(date +%Y%m%d.%H%M%S)" >> $GITHUB_OUTPUT
6767
if: github.ref == 'refs/heads/master'
6868
- run: sed --in-place 's/version=.*/version=0.${{ steps.date.outputs.date }}.SNAPSHOT/g' gradle.properties
6969
if: github.ref == 'refs/heads/master'
@@ -87,6 +87,8 @@ jobs:
8787
if: always()
8888
- run: docker cp builder:/src/core/build/ core/build/ || true
8989
if: always()
90+
- run: ls -l core/build/libs core/build/distributions
91+
if: always()
9092

9193
- run: docker cp mapfish-print_tests_1:/src/examples/build/ examples/build/ || true
9294
if: always()
@@ -135,13 +137,14 @@ jobs:
135137
- name: Publish
136138
run: c2cciutils-publish
137139
if: env.HAS_SECRETS == 'HAS_SECRETS'
138-
- run:
139-
docker run --rm --env=GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} mapfish_print_builder bash -c 'gradle
140-
build && gradle publish'
140+
- run: >
141+
docker run --rm --env=GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} mapfish_print_builder
142+
bash -c 'gradle build && gradle publish'
141143
if: ( startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' ) && env.HAS_SECRETS == 'HAS_SECRETS'
142144
143145
- id: version
144-
run: echo "##[set-output name=version;]$(grep version gradle.properties|sed "s/ \+version=.\(.*\)./\1/g")"
146+
run: echo "version=$(grep version gradle.properties|sed "s/version=\(.*\)/\1/g")" > $GITHUB_OUTPUT
147+
- run: echo "${{ steps.version.outputs.version }}"
145148
- name: Create Release
146149
id: create_release
147150
uses: actions/create-release@v1

.github/workflows/rebuild.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ jobs:
4444
- run: gpg --export-secret-keys --armor D121AF2DFA8E140688BD968930C9B913FD42EF13 > CI.asc
4545

4646
- id: last-tag
47-
run: echo "##[set-output name=tag;]$(git describe --tags --abbrev=0)"
47+
run: echo "tag=$(git describe --tags --abbrev=0)" > $GITHUB_OUTPUT
4848
- id: no-tag
49-
run: echo "##[set-output name=nb;]$(git log --oneline ${{ steps.last-tag.outputs.tag }}..HEAD|wc -l)"
49+
run: echo "nb=$(git log --oneline ${{ steps.last-tag.outputs.tag }}..HEAD|wc -l)" > $GITHUB_OUTPUT
5050
- run: sed --in-place 's/version = .*/version = "${{ steps.last-tag.outputs.tag }}"/g' build.gradle
5151
if: steps.no-tag.outputs.nb == 0
5252
- run:
@@ -98,9 +98,9 @@ jobs:
9898
- run: ./gradlew :core:libJavadocJar
9999
if: startsWith(github.ref, 'refs/tags/')
100100
- id: version
101-
run: echo "##[set-output name=version;]$(grep version build.gradle|sed "s/ \+version = .\(.*\)./\1/g")"
101+
run: echo "version=$(grep version build.gradle|sed "s/ \+version = .\(.*\)./\1/g")" > $GITHUB_OUTPUT
102102
- id: tag
103-
run: echo "##[set-output name=tag;]$(echo github.ref|sed 's%refs/tags/%%g')"
103+
run: echo "tag=$(echo github.ref|sed 's%refs/tags/%%g')" > $GITHUB_OUTPUT
104104
- name: Create Release
105105
id: create_release
106106
uses: actions/create-release@v1

0 commit comments

Comments
 (0)