mirror of
https://github.com/apache/maven-mvnd.git
synced 2025-09-09 01:30:57 +00:00
Revert 8ae4f16
and subsequent fix attempts
This commit is contained in:
125
.github/workflows/release.yaml
vendored
125
.github/workflows/release.yaml
vendored
@@ -1,125 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2017 Angelo Zerr and other contributors as
|
||||
# indicated by the @author tags.
|
||||
#
|
||||
# Licensed 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: Release
|
||||
|
||||
# manual trigger
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
GRAALVM_VERSION: '22.0.0.2'
|
||||
JAVA_VERSION: '17'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: 'Build with Graal on ${{ matrix.os }}'
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os: [ ubuntu-18.04, macOS-10.15, windows-2019 ]
|
||||
gu-binary: [gu, gu.cmd]
|
||||
exclude:
|
||||
- os: ubuntu-18.04
|
||||
gu-binary: gu.cmd
|
||||
- os: macOS-10.15
|
||||
gu-binary: gu.cmd
|
||||
- os: windows-2019
|
||||
gu-binary: gu
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: 'Check out repository'
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: 'Set vars'
|
||||
shell: bash
|
||||
run: |
|
||||
OS=$(echo '${{ runner.os }}' | awk '{print tolower($0)}')
|
||||
[[ $OS == 'ubuntu' ]] && echo "OS=linux" >> $GITHUB_ENV || echo "OS=$OS" >> $GITHUB_ENV
|
||||
[[ $OS == 'macos' ]] && echo "OS=darwin" >> $GITHUB_ENV || echo "OS=$OS" >> $GITHUB_ENV
|
||||
echo "VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
|
||||
|
||||
- name: 'Set up Graal'
|
||||
uses: DeLaGuardo/setup-graalvm@5.0
|
||||
with:
|
||||
graalvm: '${{ env.GRAALVM_VERSION }}'
|
||||
java: 'java${{ env.JAVA_VERSION }}'
|
||||
personal-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Install native-image component
|
||||
run: |
|
||||
${{ matrix.gu-binary }} install native-image
|
||||
|
||||
- name: 'Build native distribution'
|
||||
run: ./mvnw clean verify -Pnative -Dmrm=false -B -ntp -e
|
||||
|
||||
- name: 'Upload daemon test logs'
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: daemon-test-logs-${{ env.OS }}
|
||||
path: integration-tests/target/mvnd-tests/**/daemon*.log
|
||||
|
||||
- name: 'Upload artifact'
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: artifacts
|
||||
path: dist/target/mvnd-*.zip
|
||||
|
||||
release:
|
||||
runs-on: ubuntu-18.04
|
||||
needs: [build]
|
||||
|
||||
steps:
|
||||
- name: 'Check out repository'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: 'Download all build artifacts'
|
||||
uses: actions/download-artifact@v2
|
||||
|
||||
- name: 'Set up Java'
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: ${{ env.JAVA_VERSION }}
|
||||
distribution: 'zulu'
|
||||
|
||||
- name: 'Cache Maven packages'
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2
|
||||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: ${{ runner.os }}-m2
|
||||
|
||||
- name: 'Release to GitHub'
|
||||
env:
|
||||
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
JRELEASER_HOMEBREW_GITHUB_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}
|
||||
JRELEASER_SDKMAN_CONSUMER_KEY: ${{ secrets.SDKMAN_CONSUMER_KEY }}
|
||||
JRELEASER_SDKMAN_CONSUMER_TOKEN: ${{ secrets.SDKMAN_CONSUMER_TOKEN }}
|
||||
run: ./mvnw -B --file pom.xml -pl :mvnd -Prelease -DartifactsDir=artifacts jreleaser:full-release
|
||||
|
||||
- name: 'JReleaser output'
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: jreleaser-logs
|
||||
path: |
|
||||
target/jreleaser/trace.log
|
||||
target/jreleaser/output.properties
|
Reference in New Issue
Block a user