Revert to a working state

This commit is contained in:
Guillaume Nodet
2022-04-27 22:05:22 +02:00
parent 0a1f35af5f
commit c95c523692
8 changed files with 255 additions and 409 deletions

View File

@@ -30,7 +30,7 @@ env:
jobs:
build:
name: 'Build with Graal on ${{ matrix.os }}'
if: startsWith(github.event.head_commit.message, 'Updated CHANGELOG.md') != true && startsWith(github.event.head_commit.message, '[maven-release-plugin]') != true
if: startsWith(github.event.head_commit.message, '[release] Release ') != true
strategy:
fail-fast: false
matrix:
@@ -70,47 +70,5 @@ jobs:
- name: 'Upload artifact'
uses: actions/upload-artifact@v2
with:
name: artifacts
name: mvnd-${{ env.OS }}
path: dist/target/mvnd-*.zip
early-access:
runs-on: ubuntu-18.04
needs: [build]
# Only post early access releases when push to master
if: false && ${{ !github.event.issue.pull_request }} && startsWith(github.ref, 'refs/heads/master')
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 }}
run: ./mvnw -B --file pom.xml -pl :mvnd -DartifactsDir=artifacts jreleaser:release
- name: 'JReleaser output'
if: always()
uses: actions/upload-artifact@v2
with:
name: jreleaser-logs
path: |
target/jreleaser/trace.log
target/jreleaser/output.properties

View File

@@ -1,95 +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 Candidate - Stage1
# manual trigger
on:
workflow_dispatch:
env:
GRAALVM_VERSION: '21.3.0'
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 ]
runs-on: ${{ matrix.os }}
steps:
- name: 'Checkout'
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: graalvm/setup-graalvm@v1
with:
version: ${{ env.GRAALVM_VERSION }}
java-version: ${{ env.JAVA_VERSION }}
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
- 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
release:
runs-on: ubuntu-18.04
needs: [build]
steps:
- name: 'Check out repository'
uses: actions/checkout@v2
with:
# required for triggering release-candidate-stage2
token: ${{ secrets.GIT_ACCESS_TOKEN }}
- 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'
run: |
./mvnw -B -ntp \
-Drepository.url=https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git \
release:prepare

View File

@@ -1,65 +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 Candidate - Stage2
# push on tag but not on 'early-access'
on:
push:
tags:
- '!early-access'
env:
GRAALVM_VERSION: '21.3.0'
JAVA_VERSION: '17'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: 'Check out repository'
uses: actions/checkout@v2
with:
fetch-depth: 0
- 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 }}
run: ./mvnw -B --file pom.xml -pl :mvnd -Pprerelease jreleaser:release
- name: 'JReleaser output'
if: always()
uses: actions/upload-artifact@v2
with:
name: jreleaser-logs
path: |
target/jreleaser/trace.log
target/jreleaser/output.properties

View File

@@ -17,9 +17,13 @@
name: Release
# manual trigger
on:
# manual trigger
workflow_dispatch:
# build on new tags
push:
tags:
- '*'
env:
GRAALVM_VERSION: '21.3.0'
@@ -55,14 +59,7 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
- 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
run: ./mvnw clean verify -Pnative -Dmrm=false -B -ntp -e -DskipTests
- name: 'Upload artifact'
uses: actions/upload-artifact@v2
@@ -70,9 +67,44 @@ jobs:
name: artifacts
path: dist/target/mvnd-*.zip
source:
name: 'Build source distributions'
runs-on: ubuntu-18.04
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: graalvm/setup-graalvm@v1
with:
version: ${{ env.GRAALVM_VERSION }}
java-version: ${{ env.JAVA_VERSION }}
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: 'Build native distribution'
run: ./mvnw clean verify -Psource-distribution -pl :mvnd -Dmrm=false -B -ntp -e
- name: 'Upload artifact'
uses: actions/upload-artifact@v2
with:
name: artifacts
path: |
target/mvnd-*-src.zip
target/mvnd-*-src.tar.gz
release:
runs-on: ubuntu-18.04
needs: [build]
needs: [build, source]
steps:
- name: 'Check out repository'
@@ -96,19 +128,129 @@ jobs:
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: ls -R
run: ls -R
- name: 'JReleaser output'
if: always()
uses: actions/upload-artifact@v2
- name: Set environment
run: |
echo "VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
- name: Compute sha256 checksums
run: |
sha256sum artifacts/mvnd-${{ env.VERSION }}-linux-amd64.zip | cut -d ' ' -f 1 > artifacts/mvnd-${{ env.VERSION }}-linux-amd64.zip.sha256
sha256sum artifacts/mvnd-${{ env.VERSION }}-darwin-amd64.zip | cut -d ' ' -f 1 > artifacts/mvnd-${{ env.VERSION }}-darwin-amd64.zip.sha256
sha256sum artifacts/mvnd-${{ env.VERSION }}-windows-amd64.zip | cut -d ' ' -f 1 > artifacts/mvnd-${{ env.VERSION }}-windows-amd64.zip.sha256
sha256sum artifacts/mvnd-${{ env.VERSION }}-src.zip | cut -d ' ' -f 1 > artifacts/mvnd-${{ env.VERSION }}-src.zip.sha256
sha256sum artifacts/mvnd-${{ env.VERSION }}-src.tar.gz | cut -d ' ' -f 1 > artifacts/mvnd-${{ env.VERSION }}-src.tar.gz.sha256
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: jreleaser-logs
path: |
target/jreleaser/trace.log
target/jreleaser/output.properties
tag_name: ${{ env.VERSION }}
release_name: ${{ env.VERSION }}
draft: false
prerelease: false
- name: Deploy mvnd-src.zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/mvnd-${{ env.VERSION }}-src.zip
asset_name: mvnd-${{ env.VERSION }}-src.zip
asset_content_type: application/zip
- name: Deploy mvnd-src.zip.sha256
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/mvnd-${{ env.VERSION }}-src.zip.sha256
asset_name: mvnd-${{ env.VERSION }}-src.zip.sha256
asset_content_type: text/plain
- name: Deploy mvnd-src.tar.gz
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/mvnd-${{ env.VERSION }}-src.tar.gz
asset_name: mvnd-${{ env.VERSION }}-src.tar.gz
asset_content_type: application/tar.gz
- name: Deploy mvnd-src.tar.gz.sha256
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/mvnd-${{ env.VERSION }}-src.tar.gz.sha256
asset_name: mvnd-${{ env.VERSION }}-src.tar.gz.sha256
asset_content_type: text/plain
- name: Deploy mvnd-linux-amd64.zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/mvnd-${{ env.VERSION }}-linux-amd64.zip
asset_name: mvnd-${{ env.VERSION }}-linux-amd64.zip
asset_content_type: application/zip
- name: Deploy mvnd-linux-amd64.zip.sha256
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/mvnd-${{ env.VERSION }}-linux-amd64.zip.sha256
asset_name: mvnd-${{ env.VERSION }}-linux-amd64.zip.sha256
asset_content_type: text/plain
- name: Deploy mvnd-darwin-amd64.zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/mvnd-${{ env.VERSION }}-darwin-amd64.zip
asset_name: mvnd-${{ env.VERSION }}-darwin-amd64.zip
asset_content_type: application/zip
- name: Deploy mvnd-darwin-amd64.zip.sha256
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/mvnd-${{ env.VERSION }}-darwin-amd64.zip.sha256
asset_name: mvnd-${{ env.VERSION }}-darwin-amd64.zip.sha256
asset_content_type: text/plain
- name: Deploy mvnd-windows-amd64.zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/mvnd-${{ env.VERSION }}-windows-amd64.zip
asset_name: mvnd-${{ env.VERSION }}-windows-amd64.zip
asset_content_type: application/zip
- name: Deploy mvnd-windows-amd64.zip.sha256
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/mvnd-${{ env.VERSION }}-windows-amd64.zip.sha256
asset_name: mvnd-${{ env.VERSION }}-windows-amd64.zip.sha256
asset_content_type: text/plain

View File

@@ -1,54 +0,0 @@
#
# 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: Mvnd Changelog
on:
workflow_dispatch:
schedule:
# Run at 3 during night
- cron: '0 3 * * *'
jobs:
generate_changelog:
runs-on: ubuntu-latest
name: Generate changelog for master branch
steps:
- uses: actions/checkout@v1
- name: Generate changelog
uses: charmixer/auto-changelog-action@v1.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Commit files
env:
CI_USER: "github-actions[bot]"
CI_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com"
run: |
git config --local user.email "$CI_EMAIL"
git config --local user.name "$CI_USER"
git add CHANGELOG.md && git commit -m 'Updated CHANGELOG.md' && $(echo "push=1" >> $GITHUB_ENV) || echo "No changes to CHANGELOG.md"
- name: Push changes
if: env.push == 1
env:
CI_USER: "github-actions[bot]"
CI_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com"
CI_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push "https://$CI_USER:$CI_TOKEN@github.com/$GITHUB_REPOSITORY.git" HEAD:master