Skip to content

Beta

Beta #74

name: Beta
on:
schedule:
- cron: "0 0 * * 3,6"
workflow_dispatch:
inputs:
repo:
description: "repo"
default: "nanocurrency/nano-node"
required: true
ref:
description: "tag to build"
default: "develop"
required: true
env:
BETA: 1
artifact: 1
jobs:
build_auto_setup_job:
if: ${{ github.event.inputs.ref == '' }}
runs-on: ubuntu-20.04
outputs:
build_tag: ${{ steps.tag_gen.outputs.build_tag }}
build_number: ${{ steps.tag_gen.outputs.build_number }}
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 -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"
# 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:
if: ${{ github.event.inputs.ref == '' && needs.build_auto_setup_job.result == 'success' && always() || github.event.inputs.ref != '' && always() }}
needs: build_auto_setup_job
runs-on: macOS-11
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:
if: ${{ github.event.inputs.ref == '' && needs.build_auto_setup_job.result == 'success' && always() || github.event.inputs.ref != '' && always() }}
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_docker_job:
if: ${{ github.event.inputs.ref == '' && needs.build_auto_setup_job.result == 'success' && always() || github.event.inputs.ref != '' && always() }}
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:
if: ${{ github.event.inputs.ref == '' && needs.build_auto_setup_job.result == 'success' && always() || github.event.inputs.ref != '' && always() }}
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