diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 47640adf46..252266cae4 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -45,16 +45,16 @@ jobs: if: env.HAS_SECRETS == 'HAS_SECRETS' - id: tag - run: echo "##[set-output name=tag;]$(echo ${{ github.ref }}|sed 's%refs/tags/%%g')" + run: echo "tag=$(echo ${{ github.ref }}|sed 's%refs/tags/%%g')" >> $GITHUB_OUTPUT if: startsWith(github.ref, 'refs/tags/') - run: sed --in-place 's/version=.*/version=${{ steps.tag.outputs.tag }}/g' gradle.properties if: startsWith(github.ref, 'refs/tags/') - id: last-tag - run: echo "##[set-output name=tag;]$(git describe --tags --abbrev=0)" + run: echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT if: "!startsWith(github.ref, 'refs/tags/')" - id: no-tag - run: echo "##[set-output name=nb;]$(git log --oneline ${{ steps.last-tag.outputs.tag }}..HEAD|wc -l)" + run: echo "nb=$(git log --oneline ${{ steps.last-tag.outputs.tag }}..HEAD|wc -l)" >> $GITHUB_OUTPUT if: "!startsWith(github.ref, 'refs/tags/')" - run: sed --in-place 's/version=.*/version=${{ steps.last-tag.outputs.tag }}/g' gradle.properties if: "!startsWith(github.ref, 'refs/tags/') && steps.no-tag.outputs.nb == 0" @@ -63,7 +63,7 @@ jobs: }}/g' gradle.properties if: "!startsWith(github.ref, 'refs/tags/') && steps.no-tag.outputs.nb > 0" - id: date - run: echo echo "##[set-output name=date;]$(date +%Y%m%d.%H%M%S)" + run: echo echo "date=$(date +%Y%m%d.%H%M%S)" >> $GITHUB_OUTPUT if: github.ref == 'refs/heads/master' - run: sed --in-place 's/version=.*/version=0.${{ steps.date.outputs.date }}.SNAPSHOT/g' gradle.properties if: github.ref == 'refs/heads/master' @@ -87,6 +87,8 @@ jobs: if: always() - run: docker cp builder:/src/core/build/ core/build/ || true if: always() + - run: ls -l core/build/libs core/build/distributions + if: always() - run: docker cp mapfish-print_tests_1:/src/examples/build/ examples/build/ || true if: always() @@ -135,13 +137,14 @@ jobs: - name: Publish run: c2cciutils-publish if: env.HAS_SECRETS == 'HAS_SECRETS' - - run: - docker run --rm --env=GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} mapfish_print_builder bash -c 'gradle - build && gradle publish' + - run: > + docker run --rm --env=GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} mapfish_print_builder + bash -c 'gradle build && gradle publish' if: ( startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' ) && env.HAS_SECRETS == 'HAS_SECRETS' - id: version - run: echo "##[set-output name=version;]$(grep version gradle.properties|sed "s/ \+version=.\(.*\)./\1/g")" + run: echo "version=$(grep version gradle.properties|sed "s/version=\(.*\)/\1/g")" > $GITHUB_OUTPUT + - run: echo "${{ steps.version.outputs.version }}" - name: Create Release id: create_release uses: actions/create-release@v1 diff --git a/.github/workflows/rebuild.yaml b/.github/workflows/rebuild.yaml index e9348ca80f..231f5b178a 100644 --- a/.github/workflows/rebuild.yaml +++ b/.github/workflows/rebuild.yaml @@ -44,9 +44,9 @@ jobs: - run: gpg --export-secret-keys --armor D121AF2DFA8E140688BD968930C9B913FD42EF13 > CI.asc - id: last-tag - run: echo "##[set-output name=tag;]$(git describe --tags --abbrev=0)" + run: echo "tag=$(git describe --tags --abbrev=0)" > $GITHUB_OUTPUT - id: no-tag - run: echo "##[set-output name=nb;]$(git log --oneline ${{ steps.last-tag.outputs.tag }}..HEAD|wc -l)" + run: echo "nb=$(git log --oneline ${{ steps.last-tag.outputs.tag }}..HEAD|wc -l)" > $GITHUB_OUTPUT - run: sed --in-place 's/version = .*/version = "${{ steps.last-tag.outputs.tag }}"/g' build.gradle if: steps.no-tag.outputs.nb == 0 - run: @@ -98,9 +98,9 @@ jobs: - run: ./gradlew :core:libJavadocJar if: startsWith(github.ref, 'refs/tags/') - id: version - run: echo "##[set-output name=version;]$(grep version build.gradle|sed "s/ \+version = .\(.*\)./\1/g")" + run: echo "version=$(grep version build.gradle|sed "s/ \+version = .\(.*\)./\1/g")" > $GITHUB_OUTPUT - id: tag - run: echo "##[set-output name=tag;]$(echo github.ref|sed 's%refs/tags/%%g')" + run: echo "tag=$(echo github.ref|sed 's%refs/tags/%%g')" > $GITHUB_OUTPUT - name: Create Release id: create_release uses: actions/create-release@v1