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