Beta (Latest Release Branch) #66
This file contains 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: Beta (Latest Release Branch) | |
on: | |
schedule: | |
- cron: "0 0 * * 3,6" | |
env: | |
BETA: 1 | |
artifact: 1 | |
jobs: | |
build_auto_setup_job: | |
runs-on: ubuntu-20.04 | |
outputs: | |
build_tag: ${{ steps.tag_gen.outputs.build_tag }} | |
build_number: ${{ steps.tag_gen.outputs.build_number }} | |
release_branch: ${{ steps.tag_gen.outputs.release_branch }} | |
steps: | |
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0 | |
with: | |
ref: "develop" | |
repository: "nanocurrency/nano-node" | |
- name: Fetch the repository tags | |
run: | | |
git fetch --tags | |
- name: Generate the new tag | |
id: tag_gen | |
run: | | |
output_var_file="variable_list.txt" | |
ci/actions/dev-build-tag-gen.sh -r -o "${output_var_file}" | |
cat "${output_var_file}" | |
cat "${output_var_file}" >> $GITHUB_OUTPUT | |
- name: Push the new tag | |
run: | | |
# Set the tag locally | |
TAG="${{ steps.tag_gen.outputs.build_tag }}" | |
# Set git configuration | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
# Set to the specified release branch | |
git checkout origin/${{ steps.tag_gen.outputs.release_branch }} -b ${{ steps.tag_gen.outputs.release_branch }} | |
# Create and push the tag | |
git tag -a "${TAG}" -m "This tag was automatically generated by the Beta workflow" | |
git push origin "${TAG}" | |
osx_job: | |
needs: build_auto_setup_job | |
runs-on: macOS-12 | |
timeout-minutes: 90 | |
steps: | |
- name: Set the tag and the pre-release version | |
run: | | |
echo "TAG=${{ github.event.inputs.ref == '' && needs.build_auto_setup_job.outputs.build_tag || github.event.inputs.ref }}" >> $GITHUB_ENV | |
echo "VERSION_PRE_RELEASE=${{ github.event.inputs.ref == '' && needs.build_auto_setup_job.outputs.build_number || 'OFF' }}" >> $GITHUB_ENV | |
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0 | |
with: | |
submodules: "recursive" | |
ref: ${{ env.TAG }} | |
repository: ${{ github.event.inputs.repo }} | |
- name: Fetch Deps | |
run: ci/actions/osx/install_deps.sh | |
- name: Build Artifact | |
run: CI_TAG=${TAG} CI_VERSION_PRE_RELEASE=${VERSION_PRE_RELEASE} ci/build-deploy.sh "/tmp/qt/lib/cmake/Qt5"; | |
- name: Deploy Artifact | |
run: ci/actions/deploy.sh | |
env: | |
S3_BUILD_DIRECTORY: ${{ secrets.S3_BUILD_DIRECTORY }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: us-east-2 | |
linux_job: | |
needs: build_auto_setup_job | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 90 | |
steps: | |
- name: Set the tag and the pre-release version | |
run: | | |
echo "TAG=${{ github.event.inputs.ref == '' && needs.build_auto_setup_job.outputs.build_tag || github.event.inputs.ref }}" >> $GITHUB_ENV | |
echo "VERSION_PRE_RELEASE=${{ github.event.inputs.ref == '' && needs.build_auto_setup_job.outputs.build_number || 'OFF' }}" >> $GITHUB_ENV | |
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0 | |
with: | |
submodules: "recursive" | |
ref: ${{ env.TAG }} | |
repository: ${{ github.event.inputs.repo }} | |
- name: Fetch Deps | |
env: | |
COMPILER: gcc | |
run: ci/actions/linux/install_deps.sh | |
- name: Build Artifact | |
run: docker run -v ${GITHUB_WORKSPACE}:/workspace nanocurrency/nano-env:gcc /bin/bash -c "cd /workspace && BETA=1 CI_TAG=${TAG} CI_VERSION_PRE_RELEASE=${VERSION_PRE_RELEASE} ci/build-deploy.sh /usr/lib/x86_64-linux-gnu/cmake/Qt5" | |
- name: Deploy Artifact | |
run: ci/actions/deploy.sh | |
env: | |
S3_BUILD_DIRECTORY: ${{ secrets.S3_BUILD_DIRECTORY }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: us-east-2 | |
linux_rpm_job: | |
needs: build_auto_setup_job | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 90 | |
steps: | |
- name: Sets the tag and repo variables (to build) | |
run: | | |
echo "TAG=${{ github.event.inputs.ref == '' && needs.build_auto_setup_job.outputs.build_tag || github.event.inputs.ref }}" >> $GITHUB_ENV | |
echo "VERSION_PRE_RELEASE=${{ github.event.inputs.ref == '' && needs.build_auto_setup_job.outputs.build_number || 'OFF' }}" >> $GITHUB_ENV | |
echo "REPO_TO_BUILD=${{ github.event.inputs.repo }}" >> $GITHUB_ENV | |
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0 | |
with: | |
submodules: "recursive" | |
ref: ${{ github.ref }} | |
repository: ${{ github.repository }} | |
- name: RockyLinux 8 Base | |
run: ci/build-docker-image.sh docker/ci/Dockerfile-rhel nanocurrency/nano-env:rhel | |
- name: Build Artifact | |
run: | | |
mkdir -p ${GITHUB_WORKSPACE}/artifacts | |
docker run -e BETA=1 -e TAG=$TAG -e REPO_TO_BUILD=$REPO_TO_BUILD -e RPM_RELEASE=1 \ | |
-v ${GITHUB_WORKSPACE}:/workspace \ | |
-v ${GITHUB_WORKSPACE}/artifacts:/root/rpmbuild \ | |
nanocurrency/nano-env:rhel /bin/bash -c "ci/build-rhel.sh" | |
- name: Deploy Artifacts | |
run: ci/actions/deploy.sh | |
env: | |
LINUX_RPM: 1 | |
S3_BUILD_DIRECTORY: ${{ secrets.S3_BUILD_DIRECTORY }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: us-east-2 | |
linux_docker_job: | |
needs: build_auto_setup_job | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 90 | |
steps: | |
- name: Set the tag and the pre-release version | |
run: | | |
echo "TAG=${{ github.event.inputs.ref == '' && needs.build_auto_setup_job.outputs.build_tag || github.event.inputs.ref }}" >> $GITHUB_ENV | |
echo "VERSION_PRE_RELEASE=${{ github.event.inputs.ref == '' && needs.build_auto_setup_job.outputs.build_number || 'OFF' }}" >> $GITHUB_ENV | |
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0 | |
with: | |
submodules: "recursive" | |
ref: ${{ env.TAG }} | |
repository: ${{ github.event.inputs.repo }} | |
- name: Fetch Deps | |
env: | |
COMPILER: gcc | |
run: ci/actions/linux/install_deps.sh | |
- name: Build Docker (nanocurrency/nano-beta) | |
run: CI_TAG=${TAG} CI_VERSION_PRE_RELEASE=${VERSION_PRE_RELEASE} ci/actions/linux/docker-build.sh | |
- name: Deploy Docker Hub (nanocurrency/nano-beta) | |
if: ${{ github.repository == 'nanocurrency/nano-node' }} | |
run: CI_TAG=${TAG} ci/actions/linux/docker-deploy.sh | |
env: | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Login to ghcr.io | |
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a #v2.1.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Deploy Docker (ghcr.io) | |
run: ci/actions/linux/ghcr_push.sh | |
windows_job: | |
needs: build_auto_setup_job | |
runs-on: windows-latest | |
timeout-minutes: 90 | |
steps: | |
- name: Set the tag and the pre-release version | |
run: | | |
Write-Output "TAG=${{ github.event.inputs.ref == '' && needs.build_auto_setup_job.outputs.build_tag || github.event.inputs.ref }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
Write-Output "VERSION_PRE_RELEASE=${{ github.event.inputs.ref == '' && needs.build_auto_setup_job.outputs.build_number || 'OFF' }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0 | |
with: | |
submodules: "recursive" | |
ref: ${{ env.TAG }} | |
repository: ${{ github.event.inputs.repo }} | |
- name: Fetch Deps | |
run: ci/actions/windows/install_deps.ps1 | |
- name: Build Artifact | |
run: ci/actions/windows/build.ps1 | |
env: | |
CSC_LINK: ${{ secrets.CSC_LINK }} | |
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} | |
- name: Deploy Artifact | |
run: ci/actions/windows/deploy.ps1 | |
env: | |
S3_BUILD_DIRECTORY: ${{ secrets.S3_BUILD_DIRECTORY }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: us-east-2 |