-
Notifications
You must be signed in to change notification settings - Fork 312
77 lines (70 loc) · 2.2 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
name: Build and Release
on:
workflow_run:
workflows: [E2E tests]
types: [completed]
branches: [master, ci-migration]
push:
tags:
- "v*"
# for debug purposes only
branches: [ci-migration]
# env:
# RELEASE_BUILD: ${{ contains(github.ref, 'refs/tags/v') && 'true' || 'false' }}
# SNAPSHOT_BUILD: ${{ github.ref == 'refs/heads/master' && 'true' || 'false' }}
# RC_BUILD: ${{ github.ref_type == 'tag' && endsWith(github.ref, '-rc') && 'true' || 'false' }}
# BUILD_VERSION:
env:
GITHUB_OWNER: mysteriumnetwork
GITHUB_REPO: node
GITHUB_SNAPSHOT_REPO: node-builds
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build-packages:
# if: |
# ${{ github.event.workflow_run.conclusion == 'success' }} ||
# ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
runs-on: ubuntu-latest
environment: production
strategy:
max-parallel: 4
matrix:
platform:
- PackageLinuxRaspberryImage
- PackageLinuxAmd64
- PackageLinuxArm
- PackageLinuxDebianAmd64
- PackageLinuxDebianArm64
- PackageLinuxDebianArm
- PackageMacOSAmd64
- PackageMacOSArm64
- PackageWindowsAmd64
- PackageAndroid
- PackageAndroidProvider
- PackageDockerSwaggerRedoc
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21.x'
- name: Generate Env
run: go run mage.go -v GenerateEnvFile
- 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 FPM
run: |
sudo apt-get install ruby-dev build-essential
sudo gem i fpm -f
- name: Build package
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
source build/env.sh
go run mage.go -v ${{ matrix.platform }}