Skip to content

Commit

Permalink
Restore workflows order
Browse files Browse the repository at this point in the history
  • Loading branch information
tzununbekov committed Feb 21, 2024
1 parent fd8e881 commit 5b5bb88
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 31 deletions.
36 changes: 20 additions & 16 deletions .github/workflows/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build packages
on:
workflow_call:
push:
branches: [master, ci-migration]
branches: [master]
tags:

env:
Expand Down Expand Up @@ -71,17 +71,17 @@ jobs:
max-parallel: 4
matrix:
platform:
# - PackageLinuxRaspberryImage
- PackageLinuxRaspberryImage
- PackageLinuxAmd64
# - PackageLinuxArm
# - PackageLinuxDebianAmd64
# - PackageLinuxDebianArm64
# - PackageLinuxDebianArm
# - PackageMacOSAmd64
# - PackageMacOSArm64
# - PackageWindowsAmd64
# - PackageAndroid
# - PackageAndroidProvider
- PackageLinuxArm
- PackageLinuxDebianAmd64
- PackageLinuxDebianArm64
- PackageLinuxDebianArm
- PackageMacOSAmd64
- PackageMacOSArm64
- PackageWindowsAmd64
- PackageAndroid
- PackageAndroidProvider

steps:
- uses: actions/checkout@v4
Expand All @@ -95,9 +95,8 @@ jobs:

- name: Create bucket
if: |
contains(github.ref, 'refs/tags') ||
github.ref == 'refs/heads/master' ||
github.ref == 'refs/heads/ci-migration'
github.ref_type == 'tag'
env:
AWS_EC2_METADATA_DISABLED: true
run: |
Expand Down Expand Up @@ -137,9 +136,14 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Build docker
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
source env.sh
go run mage.go -v PackageDockerSwaggerRedoc
release:
needs: [build-packages, build-swagger]
uses: ./.github/workflows/release.yml
secrets: inherit
if: |
github.ref == 'refs/heads/master' ||
github.ref_type == 'tag'
43 changes: 30 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
name: Release
on:
workflow_call:
# push:
# tags:

env:
GITHUB_OWNER: mysteriumnetwork
GITHUB_REPO: node
GITHUB_SNAPSHOT_REPO: node-builds
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

jobs:
release-snapshot:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'

strategy:
max-parallel: 3
matrix:
platform:
- ReleaseGithubSnapshot
# master only
# Nightly build
# - ReleaseGithubNightly
- ReleaseDockerSnapshot
- ReleaseDebianPPASnapshot
Expand All @@ -32,14 +39,15 @@ jobs:
- name: Release snapshot
run: |
source env.sh
go run mage.go -v ${{ matrix.platform }}
sudo -E go run mage.go -v ${{ matrix.platform }}
- name: Release Go report
if: github.ref == 'refs/heads/master'
run: bin/release_goreport

release-tag:
runs-on: ubuntu-latest
if: github.ref_type == 'tag'

strategy:
max-parallel: 4
Expand All @@ -65,10 +73,13 @@ jobs:
- name: Release tag
run: |
source build/env.sh
go run mage.go -v ${{ matrix.platform }}
sudo -E go run mage.go -v ${{ matrix.platform }}
post-release:
runs-on: ubuntu-latest
needs: [release-snapshot, release-tag]
if: always() && contains(join(needs.*.result, ','), 'success')

steps:
- uses: actions/checkout@v4
- name: Setup Go
Expand All @@ -81,13 +92,19 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Remove bucket
run: go run mage.go -v RemoveBucket
- name: Notify UptimeRobot
if: github.ref == 'refs/heads/master'
env:
AWS_EC2_METADATA_DISABLED: true
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: go run mage.go -v CreateAvadoPR
source env.sh
go run mage.go -v RemoveBucket
# - 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

3 changes: 1 addition & 2 deletions .github/workflows/tests-and-linters.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Tests
on:
workflow_call:
# pull_request:
pull_request:

env:
GOFLAGS: "-count=1"
Expand Down

0 comments on commit 5b5bb88

Please sign in to comment.