Build docs separately #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
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 | |
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: 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 | |
# Following line ensures that s3 bucket name won't overlap with the old CI's target | |
export BUILD_NUMBER=$BUILD_NUMBER"-ghactions" | |
go run mage.go -v ${{ matrix.platform }} | |
build-swagger: | |
# if: | | |
# ${{ github.event.workflow_run.conclusion == 'success' }} || | |
# ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }} | |
runs-on: ubuntu-latest | |
environment: production | |
needs: [build-packages] | |
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: Build docker | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
run: | | |
source build/env.sh | |
# Following line ensures that s3 bucket name won't overlap with the old CI's target | |
export BUILD_NUMBER=$BUILD_NUMBER"-ghactions" | |
go run mage.go -v PackageDockerSwaggerRedoc |