Fix broken artifact publishing process for openhouse-1.5.2 branch. #461
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Licensed to the Apache Software Foundation (ASF) under one | |
| # or more contributor license agreements. See the NOTICE file | |
| # distributed with this work for additional information | |
| # regarding copyright ownership. The ASF licenses this file | |
| # to you under the Apache License, Version 2.0 (the | |
| # "License"); you may not use this file except in compliance | |
| # with the License. You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, | |
| # software distributed under the License is distributed on an | |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
| # KIND, either express or implied. See the License for the | |
| # specific language governing permissions and limitations | |
| # under the License. | |
| # | |
| name: "Java CI" | |
| on: | |
| push: | |
| branches: ['openhouse-1.5.2'] | |
| tags-ignore: [v*] | |
| pull_request: | |
| branches: ['**'] | |
| paths-ignore: | |
| - '.github/ISSUE_TEMPLATE/**' | |
| - '.github/workflows/api-binary-compatibility.yml' | |
| - '.github/workflows/delta-conversion-ci.yml' | |
| - '.github/workflows/flink-ci.yml' | |
| - '.github/workflows/hive-ci.yml' | |
| - '.github/workflows/jmh-benchmarks-ci.yml' | |
| - '.github/workflows/labeler.yml' | |
| - '.github/workflows/licence-check.yml' | |
| - '.github/workflows/open-api.yml' | |
| - '.github/workflows/publish-snapshot.yml' | |
| - '.github/workflows/recurring-jmh-benchmarks.yml' | |
| - '.github/workflows/site-ci.yml' | |
| - '.github/workflows/spark-ci.yml' | |
| - '.github/workflows/stale.yml' | |
| - '.gitignore' | |
| - 'dev/**' | |
| - 'python/**' | |
| - 'python_legacy/**' | |
| - 'docs/**' | |
| - 'site/**' | |
| - 'open-api/**' | |
| - 'format/**' | |
| - '.gitattributes' | |
| - 'README.md' | |
| - 'CONTRIBUTING.md' | |
| - 'LICENSE' | |
| - 'NOTICE' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| build-checks: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: zulu | |
| java-version: 8 | |
| - run: ./gradlew -DsparkVersions=3.5 build -x test -x javadoc -x integrationTest | |
| release: | |
| needs: build-checks | |
| if: ${{ github.event_name == 'push' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # REQUIRED for git describe to find tags | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: zulu | |
| java-version: 8 | |
| - run: echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts | |
| - name: Build for release | |
| run: ./gradlew -DsparkVersions=3.5 build -x test -x integrationTest | |
| - name: Create and push version tag | |
| id: create_tag | |
| if: ${{ github.event_name == 'push' | |
| && github.ref == 'refs/heads/openhouse-1.5.2' | |
| && github.repository == 'linkedin/iceberg' | |
| && !contains(toJSON(github.event.commits.*.message), '[skip release]') }} | |
| run: ./ci-create-tag.sh | |
| env: | |
| GIT_USER_NAME: "GitHub Actions" | |
| GIT_USER_EMAIL: "[email protected]" | |
| - name: Perform release | |
| if: ${{ github.event_name == 'push' | |
| && github.ref == 'refs/heads/openhouse-1.5.2' | |
| && github.repository == 'linkedin/iceberg' | |
| && !contains(toJSON(github.event.commits.*.message), '[skip release]') }} | |
| run: | | |
| echo "Using version: ${{ steps.create_tag.outputs.NEW_VERSION }}" | |
| ./gradlew githubRelease publishToSonatype closeAndReleaseStagingRepository \ | |
| -PciVersion="${{ steps.create_tag.outputs.NEW_VERSION }}" \ | |
| -DsparkVersions=3.5 \ | |
| -x test -x integrationTest | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONATYPE_USER: ${{ secrets.SONATYPE_USERNAME }} | |
| SONATYPE_PWD: ${{secrets.SONATYPE_PASSWORD}} | |
| PGP_KEY: ${{secrets.PGP_KEY}} | |
| PGP_PWD: ${{secrets.PGP_PWD}} |