github.com/mysteriumnetwork/node@v0.0.0-20240516044423-365054f76801/.github/workflows/release.yml (about) 1 name: Release 2 on: 3 workflow_call: 4 5 env: 6 GITHUB_OWNER: mysteriumnetwork 7 GITHUB_REPO: node 8 GITHUB_SNAPSHOT_REPO: node-builds 9 GITHUB_API_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} 10 AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} 11 AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 12 AWS_EC2_METADATA_DISABLED: true 13 MAVEN_USER: ${{ secrets.MAVEN_USER }} 14 MAVEN_PASS: ${{ secrets.MAVEN_PASS }} 15 MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }} 16 17 jobs: 18 release-nightly: 19 runs-on: ubuntu-latest 20 if: github.event_name == 'schedule' 21 env: 22 NIGHTLY_BUILD: true 23 24 steps: 25 - uses: actions/checkout@v4 26 - name: Setup Go 27 uses: actions/setup-go@v5 28 with: 29 go-version: '1.21.x' 30 - uses: actions/download-artifact@v4 31 with: 32 name: env.sh 33 github-token: ${{ secrets.GITHUB_TOKEN }} 34 35 - name: Release nightly snapshot 36 run: | 37 source env.sh 38 go run mage.go -v ReleaseGithubNightly 39 40 - name: Notify UptimeRobot 41 run: curl -so /dev/null -I "${{ secrets.NIGHTLY_UPTIMEROBOT }}" 42 43 release-snapshot: 44 runs-on: ubuntu-latest 45 if: | 46 github.ref == 'refs/heads/master' && 47 github.event_name != 'schedule' 48 49 strategy: 50 max-parallel: 3 51 matrix: 52 platform: 53 - ReleaseGithubSnapshot 54 - ReleaseDockerSnapshot 55 - ReleaseDebianPPASnapshot 56 57 steps: 58 - uses: actions/checkout@v4 59 - name: Setup Go 60 uses: actions/setup-go@v5 61 with: 62 go-version: '1.21.x' 63 - uses: actions/download-artifact@v4 64 with: 65 name: env.sh 66 github-token: ${{ secrets.GITHUB_TOKEN }} 67 - name: Login to Docker Hub 68 uses: docker/login-action@v3 69 with: 70 username: ${{ secrets.DOCKERHUB_USERNAME }} 71 password: ${{ secrets.DOCKERHUB_PASSWORD }} 72 - name: Set up Docker Buildx 73 uses: docker/setup-buildx-action@v3 74 - name: Setup build environment 75 run: | 76 sudo apt-get update 77 sudo apt-get install devscripts build-essential lintian dput dh-make python3-paramiko 78 echo -e "${{ secrets.GPG_SIGNING_KEY }}" | gpg --import 79 mkdir -p ~/.ssh 80 echo -e "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa 81 chmod 0600 ~/.ssh/id_rsa 82 83 - name: Release snapshot 84 run: | 85 source env.sh 86 go run mage.go -v ${{ matrix.platform }} 87 88 - name: Release Go report 89 if: github.ref == 'refs/heads/master' 90 run: bin/release_goreport 91 92 release-tag: 93 runs-on: ubuntu-latest 94 if: github.ref_type == 'tag' 95 96 strategy: 97 max-parallel: 4 98 matrix: 99 platform: 100 - ReleaseGithubTag 101 - ReleaseDockerTag 102 - ReleaseDebianPPAPreRelease 103 - ReleaseAndroidSDK 104 - ReleaseAndroidProviderSDK 105 106 steps: 107 - uses: actions/checkout@v4 108 - name: Setup Go 109 uses: actions/setup-go@v5 110 with: 111 go-version: '1.21.x' 112 - uses: actions/download-artifact@v4 113 with: 114 name: env.sh 115 github-token: ${{ secrets.GITHUB_TOKEN }} 116 - name: Login to Docker Hub 117 uses: docker/login-action@v3 118 with: 119 username: ${{ secrets.DOCKERHUB_USERNAME }} 120 password: ${{ secrets.DOCKERHUB_PASSWORD }} 121 - name: Set up Docker Buildx 122 uses: docker/setup-buildx-action@v3 123 - name: Setup build environment 124 run: | 125 sudo apt-get update 126 sudo apt-get install devscripts build-essential lintian dput dh-make python3-paramiko 127 echo -e "${{ secrets.GPG_SIGNING_KEY }}" | gpg --import 128 mkdir -p ~/.ssh 129 echo -e "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa 130 chmod 0600 ~/.ssh/id_rsa 131 132 - name: Release tag 133 run: | 134 source env.sh 135 go run mage.go -v ${{ matrix.platform }} 136 137 post-release: 138 runs-on: ubuntu-latest 139 if: github.ref_type == 'tag' 140 needs: [release-tag] 141 142 steps: 143 - uses: actions/checkout@v4 144 - name: Setup Go 145 uses: actions/setup-go@v5 146 with: 147 go-version: '1.21.x' 148 - uses: actions/download-artifact@v4 149 with: 150 name: env.sh 151 github-token: ${{ secrets.GITHUB_TOKEN }} 152 153 - name: PR Avado 154 run: | 155 source env.sh 156 go run mage.go -v CreateAvadoPR