mirror of https://github.com/hyperledger/besu
Release process has been broken down to pre-release and release to allow user testing. This is not required and adds additional step. Release workflows are combined into a single release workflow which trigger on a release (#7152)
Signed-off-by: Chaminda Divitotawela <cdivitotawela@gmail.com>pull/7159/head
parent
2df721619a
commit
d7c028966d
@ -1,120 +0,0 @@ |
||||
|
||||
name: release artifacts |
||||
|
||||
on: |
||||
release: |
||||
types: |
||||
- prereleased |
||||
env: |
||||
GRADLE_OPTS: "-Dorg.gradle.parallel=true -Dorg.gradle.caching=true" |
||||
|
||||
jobs: |
||||
artifacts: |
||||
runs-on: ubuntu-22.04 |
||||
permissions: |
||||
contents: write |
||||
outputs: |
||||
tarSha: ${{steps.hashes.outputs.tarSha}} |
||||
zipSha: ${{steps.hashes.outputs.zipSha}} |
||||
steps: |
||||
- name: checkout |
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 |
||||
- name: Set up JDK 17 |
||||
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 |
||||
with: |
||||
distribution: 'temurin' |
||||
java-version: '17' |
||||
- name: setup gradle |
||||
uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 |
||||
with: |
||||
cache-disabled: true |
||||
- name: assemble release |
||||
run: |
||||
./gradlew -Prelease.releaseVersion=${{github.event.release.name}} -Pversion=${{github.event.release.name}} assemble |
||||
- name: hashes |
||||
id: hashes |
||||
run: | |
||||
cd build/distributions |
||||
echo "zipSha=$(shasum -a 256 besu*.zip)" |
||||
echo "tarSha=$(shasum -a 256 besu*.tar.gz)" |
||||
echo "zipSha=$(shasum -a 256 besu*.zip)" >> $GITHUB_OUTPUT |
||||
echo "tarSha=$(shasum -a 256 besu*.tar.gz)" >> $GITHUB_OUTPUT |
||||
- name: upload tarball |
||||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 |
||||
with: |
||||
path: 'build/distributions/besu*.tar.gz' |
||||
name: besu-${{ github.event.release.name }}.tar.gz |
||||
compression-level: 0 |
||||
- name: upload zipfile |
||||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 |
||||
with: |
||||
path: 'build/distributions/besu*.zip' |
||||
name: besu-${{ github.event.release.name }}.zip |
||||
compression-level: 0 |
||||
|
||||
testWindows: |
||||
runs-on: windows-2022 |
||||
needs: artifacts |
||||
timeout-minutes: 10 |
||||
steps: |
||||
- name: Set up Java |
||||
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 |
||||
with: |
||||
distribution: adopt |
||||
java-version: 17 |
||||
- name: Download zip |
||||
uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe |
||||
with: |
||||
pattern: besu-*.zip |
||||
merge-multiple: true |
||||
- name: test Besu |
||||
run: | |
||||
dir |
||||
unzip besu-*.zip -d besu-tmp |
||||
cd besu-tmp |
||||
mv besu-* ../besu |
||||
cd .. |
||||
besu\bin\besu.bat --help |
||||
besu\bin\besu.bat --version |
||||
publish: |
||||
runs-on: ubuntu-22.04 |
||||
needs: [artifacts, testWindows] |
||||
permissions: |
||||
contents: write |
||||
steps: |
||||
- name: Download archives |
||||
uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe |
||||
with: |
||||
pattern: besu-* |
||||
merge-multiple: true |
||||
path: 'build/distributions' |
||||
- name: Upload Release assets |
||||
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 |
||||
with: |
||||
append_body: true |
||||
files: | |
||||
build/distributions/besu*.tar.gz |
||||
build/distributions/besu*.zip |
||||
body: | |
||||
${{needs.artifacts.outputs.tarSha}} |
||||
${{needs.artifacts.outputs.zipSha}} |
||||
artifactoryPublish: |
||||
runs-on: ubuntu-22.04 |
||||
needs: artifacts |
||||
steps: |
||||
- name: checkout |
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 |
||||
- name: Set up JDK 17 |
||||
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 |
||||
with: |
||||
distribution: 'temurin' |
||||
java-version: '17' |
||||
- name: setup gradle |
||||
uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 |
||||
with: |
||||
cache-disabled: true |
||||
- name: Artifactory Publish |
||||
env: |
||||
ARTIFACTORY_USER: ${{ secrets.BESU_ARTIFACTORY_USER }} |
||||
ARTIFACTORY_KEY: ${{ secrets.BESU_ARTIFACTORY_TOKEN }} |
||||
run: ./gradlew -Prelease.releaseVersion=${{ github.event.release.name }} -Pversion=${{github.event.release.name}} artifactoryPublish |
@ -1,123 +0,0 @@ |
||||
name: docker |
||||
on: |
||||
release: |
||||
types: |
||||
- prereleased |
||||
env: |
||||
registry: docker.io |
||||
|
||||
jobs: |
||||
hadolint: |
||||
runs-on: ubuntu-22.04 |
||||
steps: |
||||
- name: Checkout Repo |
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 |
||||
- name: Set up Java |
||||
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 |
||||
with: |
||||
distribution: temurin |
||||
java-version: 17 |
||||
- name: setup gradle |
||||
uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 |
||||
with: |
||||
cache-disabled: true |
||||
- name: hadoLint |
||||
run: docker run --rm -i hadolint/hadolint < docker/Dockerfile |
||||
buildDocker: |
||||
needs: hadolint |
||||
permissions: |
||||
contents: read |
||||
packages: write |
||||
|
||||
strategy: |
||||
fail-fast: false |
||||
matrix: |
||||
platform: |
||||
- ubuntu-22.04 |
||||
- [self-hosted, ARM64] |
||||
runs-on: ${{ matrix.platform }} |
||||
steps: |
||||
- name: Prepare |
||||
id: prep |
||||
run: | |
||||
platform=${{ matrix.platform }} |
||||
if [ "$platform" = 'ubuntu-22.04' ]; then |
||||
echo "PLATFORM_PAIR=linux-amd64" >> $GITHUB_OUTPUT |
||||
echo "ARCH=amd64" >> $GITHUB_OUTPUT |
||||
else |
||||
echo "PLATFORM_PAIR=linux-arm64" >> $GITHUB_OUTPUT |
||||
echo "ARCH=arm64" >> $GITHUB_OUTPUT |
||||
fi |
||||
- name: Checkout Repo |
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 |
||||
- name: short sha |
||||
id: shortSha |
||||
run: echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT |
||||
- name: Set up Java |
||||
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 |
||||
with: |
||||
distribution: temurin |
||||
java-version: 17 |
||||
- name: setup gradle |
||||
uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 |
||||
with: |
||||
cache-disabled: true |
||||
- name: install goss |
||||
run: | |
||||
mkdir -p docker/reports |
||||
curl -L https://github.com/aelsabbahy/goss/releases/download/v0.4.4/goss-${{ steps.prep.outputs.PLATFORM_PAIR }} -o ./docker/tests/goss-${{ steps.prep.outputs.PLATFORM_PAIR }} |
||||
- name: login to ${{ env.registry }} |
||||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d |
||||
with: |
||||
registry: ${{ env.registry }} |
||||
username: ${{ secrets.DOCKER_USER_RW }} |
||||
password: ${{ secrets.DOCKER_PASSWORD_RW }} |
||||
- name: build and test docker |
||||
uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 |
||||
env: |
||||
architecture: ${{ steps.prep.outputs.ARCH }} |
||||
with: |
||||
cache-disabled: true |
||||
arguments: testDocker -PdockerOrgName=${{ env.registry }}/${{ secrets.DOCKER_ORG }} -Pversion=${{github.event.release.name}} -Prelease.releaseVersion=${{ github.event.release.name }} |
||||
- name: publish |
||||
env: |
||||
architecture: ${{ steps.prep.outputs.ARCH }} |
||||
run: ./gradlew --no-daemon dockerUpload -PdockerOrgName=${{ env.registry }}/${{ secrets.DOCKER_ORG }} -Pversion=${{github.event.release.name}} -Prelease.releaseVersion=${{ github.event.release.name }} |
||||
multiArch: |
||||
needs: buildDocker |
||||
runs-on: ubuntu-22.04 |
||||
permissions: |
||||
contents: read |
||||
packages: write |
||||
steps: |
||||
- name: Checkout Repo |
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 |
||||
- name: Set up Java |
||||
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 |
||||
with: |
||||
distribution: temurin |
||||
java-version: 17 |
||||
- name: setup gradle |
||||
uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 |
||||
with: |
||||
cache-disabled: true |
||||
- name: login to ${{ env.registry }} |
||||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d |
||||
with: |
||||
registry: ${{ env.registry }} |
||||
username: ${{ secrets.DOCKER_USER_RW }} |
||||
password: ${{ secrets.DOCKER_PASSWORD_RW }} |
||||
- name: multi-arch docker |
||||
run: ./gradlew manifestDocker -PdockerOrgName=${{ env.registry }}/${{ secrets.DOCKER_ORG }} -Pversion=${{github.event.release.name}} -Prelease.releaseVersion=${{ github.event.release.name }} |
||||
amendNotes: |
||||
needs: multiArch |
||||
runs-on: ubuntu-22.04 |
||||
permissions: |
||||
contents: write |
||||
steps: |
||||
- name: add pull command to release notes |
||||
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 |
||||
with: |
||||
append_body: true |
||||
body: | |
||||
`docker pull ${{env.registry}}/${{secrets.DOCKER_ORG}}/besu:${{github.event.release.name}}` |
Loading…
Reference in new issue