release #18
Workflow file for this run
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
name: Build Upstream Besu | |
on: | |
push: | |
branches: | |
- main | |
- publish_to_artifactory | |
paths: | |
- 'version.env' | |
permissions: | |
contents: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Dotenv Action | |
id: dotenv | |
uses: falti/[email protected] | |
with: | |
path: version.env | |
keys-case: lower | |
log-variables: true | |
- name: Checkout Besu repository | |
uses: actions/checkout@v4 | |
with: | |
repository: hyperledger/besu | |
ref: ${{ steps.dotenv.outputs.upstream_besu_ref }} | |
path: linea-besu | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 21 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Build Linea Besu | |
working-directory: ./linea-besu | |
run: ./gradlew -Prelease.releaseVersion=${{ steps.dotenv.outputs.linea_besu_version }} -Pversion=${{ steps.dotenv.outputs.linea_besu_version }} distTar | |
- name: Generate Checksum | |
working-directory: ./linea-besu/build/distributions | |
run: | | |
for file in *.tar.gz; do | |
shasum -a 256 "$file" > "$file.sha256" | |
done | |
# Create release tag and attach the distribution | |
- name: GH Linea Besu Release | |
id: release | |
uses: softprops/[email protected] | |
with: | |
files: | | |
./linea-besu/build/distributions/besu-${{ steps.dotenv.outputs.linea_besu_version }}.tar.gz | |
./linea-besu/build/distributions/*.sha256 | |
tag_name: ${{ steps.dotenv.outputs.linea_besu_version }} | |
body: | | |
**Linea Besu Version**: `${{ steps.dotenv.outputs.linea_besu_version }}` | |
**Upstream Besu Version**: `${{ steps.dotenv.outputs.upstream_besu_ref }}` | |
draft: false | |
prerelease: false | |
preserve_order: true | |
# JFrog Artifactory Authentication | |
- name: Authneticate JFrog | |
id: jfrog | |
uses: jfrog/setup-jfrog-cli@v4 | |
env: | |
JF_URL: "https://consensys.jfrog.io" | |
with: | |
oidc-provider-name: 'github' | |
oidc-audience: '' | |
# temporary fix till upstream gradle file is fixed | |
- name: Replace contextUrl in build.gradle | |
run: | | |
sed -i 's|contextUrl = "https://hyperledger.jfrog.io/${artifactoryOrg}"|contextUrl = "https://consensys.jfrog.io/${artifactoryOrg}"|g' linea-besu/build.gradle | |
# Publish to Artifactory | |
- name: Publish Artifactory | |
id: artifactory | |
working-directory: ./linea-besu | |
run: ./gradlew -Prelease.releaseVersion=${{ steps.dotenv.outputs.linea_besu_version }} -Pversion=${{ steps.dotenv.outputs.linea_besu_version }} artifactoryPublish | |
env: | |
ARTIFACTORY_USER: ${{ steps.jfrog.outputs.oidc-user }} | |
ARTIFACTORY_KEY: ${{ steps.jfrog.outputs.oidc-token }} | |
ARTIFACTORY_ORG: 'artifactory' | |
ARTIFACTORY_REPO: 'linea-besu-maven' |