Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nightly builds #5995

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
branches: [master]
tags:
- '*'
schedule:
- cron: '0 2 * * *'

env:
GITHUB_OWNER: mysteriumnetwork
Expand Down Expand Up @@ -33,10 +35,10 @@ jobs:
- name: Prepare environment
run: |
RELEASE_BUILD=false
if [[ "${GITHUB_REF}" == /refs/tags/* ]]; then RELEASE_BUILD=true; fi
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then RELEASE_BUILD=true; fi

RC_BUILD=false
if [[ "${GITHUB_REF}" == /refs/tags/*-rc* ]]; then RC_BUILD=true; fi
if [[ "${GITHUB_REF}" == refs/tags/*-rc* ]]; then RC_BUILD=true; fi

SNAPSHOT_BUILD=false
if [[ "${GITHUB_REF}" == "refs/heads/master" ]]; then SNAPSHOT_BUILD=true; fi
Expand All @@ -45,7 +47,7 @@ jobs:
if [[ "${SNAPSHOT_BUILD}" == "false" && "${RELEASE_BUILD}" == "false" ]]; then PR_BUILD=true; fi

if [[ "${RELEASE_BUILD}" == "true" ]]; then
BUILD_VERSION="${GITHUB_REF#/refs/tags/}";
BUILD_VERSION="${GITHUB_REF#refs/tags/}";
elif [[ "${SNAPSHOT_BUILD}" == "true" ]]; then
BUILD_VERSION="$(git describe --abbrev=0 --tags)"-1snapshot-"$(date '+%Y%m%dT%H%M')"-"$(echo ${GITHUB_SHA} | cut -c1-8)";
elif [[ "${PR_BUILD}" == "true" ]]; then
Expand Down
35 changes: 24 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,29 @@ env:
AWS_EC2_METADATA_DISABLED: true

jobs:
release-nightly:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'schedule' }}

steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21.x'
- uses: actions/download-artifact@v4
with:
name: env.sh
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Release nightly snapshot
run: |
source env.sh
go run mage.go -v ReleaseGithubNightly

- name: Notify UptimeRobot
run: curl -so /dev/null -I "${{ secrets.NIGHTLY_UPTIMEROBOT }}"

release-snapshot:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
Expand All @@ -21,8 +44,6 @@ jobs:
matrix:
platform:
- ReleaseGithubSnapshot
# Nightly build
# - ReleaseGithubNightly
- ReleaseDockerSnapshot
- ReleaseDebianPPASnapshot

Expand Down Expand Up @@ -110,8 +131,7 @@ jobs:

post-release:
runs-on: ubuntu-latest
needs: [release-snapshot, release-tag]
if: always() && contains(join(needs.*.result, ','), 'success')
needs: [release-tag]

steps:
- uses: actions/checkout@v4
Expand All @@ -124,14 +144,7 @@ jobs:
name: env.sh
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Notify UptimeRobot
if: github.ref == 'refs/heads/master'
run: |
if [ "$NIGHTLY_BUILD" = "1" -o "$NIGHTLY_BUILD" = "T" -o "$NIGHTLY_BUILD" = "true" -o "$NIGHTLY_BUILD" = "True" -o "$NIGHTLY_BUILD" = "TRUE" ]; then
curl -so /dev/null -I "$NIGHTLY_UPTIMEROBOT"
fi
- name: PR Avado
run: |
source env.sh
go run mage.go -v CreateAvadoPR