### _Why are the changes needed?_ Migrate to GA setup-java from v1 to v2 https://github.com/actions/setup-java ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [ ] [Run test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #1520 from pan3793/ga. Closes #1520 7aad9d29 [Cheng Pan] nit 5b312423 [Cheng Pan] Use setup-java@v2 Authored-by: Cheng Pan <chengpan@apache.org> Signed-off-by: Cheng Pan <chengpan@apache.org>
52 lines
1.8 KiB
YAML
52 lines
1.8 KiB
YAML
name: Publish Snapshot
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 0 * * *'
|
|
|
|
jobs:
|
|
publish-snapshot:
|
|
if: ${{ startsWith(github.repository, 'apache/') }}
|
|
runs-on: ubuntu-20.04
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
branch:
|
|
- master
|
|
- branch-1.3
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@master
|
|
with:
|
|
ref: ${{ matrix.branch }}
|
|
- name: Cache Maven local repository
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.m2/repository
|
|
key: snapshot-maven-${{ hashFiles('**/pom.xml') }}
|
|
restore-keys: |
|
|
snapshot-maven-
|
|
- name: Setup JDK 8
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
distribution: zulu
|
|
java-version: 8
|
|
- name: Publish snapshot - master
|
|
if: ${{ matrix.branch == 'master' }}
|
|
env:
|
|
ASF_USERNAME: ${{ secrets.NEXUS_USER }}
|
|
ASF_PASSWORD: ${{ secrets.NEXUS_PW }}
|
|
run: |
|
|
rm -rf ~/.m2/repository/org/apache/kyuubi
|
|
./build/mvn clean deploy -s ./build/release/asf-settings.xml -DskipTests -Pflink-provided,spark-provided
|
|
./build/mvn clean deploy -s ./build/release/asf-settings.xml -DskipTests -Pflink-provided,spark-provided,spark-3.1 -pl dev/kyuubi-extension-spark-3-1 -am
|
|
./build/mvn clean deploy -s ./build/release/asf-settings.xml -DskipTests -Pflink-provided,spark-provided,spark-3.2 -pl dev/kyuubi-extension-spark-3-2 -am
|
|
- name: Publish snapshot - branch-1.3
|
|
if: ${{ matrix.branch == 'branch-1.3' }}
|
|
env:
|
|
ASF_USERNAME: ${{ secrets.NEXUS_USER }}
|
|
ASF_PASSWORD: ${{ secrets.NEXUS_PW }}
|
|
run: |
|
|
rm -rf ~/.m2/repository/org/apache/kyuubi
|
|
./build/mvn clean deploy -s ./build/release/asf-settings.xml -DskipTests -Pflink-provided,spark-provided,kyuubi-extension-spark-3-1
|