Merge pull request #2295 from nspcc-dev/github/upload-build-artifacts

.github: upload binaries for Build workflows
This commit is contained in:
Roman Khimov 2021-12-03 12:39:29 +03:00 committed by GitHub
commit d42d4fc812
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 40 deletions

View file

@ -9,6 +9,11 @@ on:
- 'scripts/**'
- '**/*.md'
workflow_dispatch:
inputs:
ref:
description: 'Ref to build CLI for Ubuntu and Windows Server Core [default: latest master; examples: v0.92.0, 0a4ff9d3e4a9ab432fd5812eb18c98e03b5a7432]'
required: false
default: ''
env:
GO111MODULE: "on"
@ -21,6 +26,8 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.ref }}
# Allows to fetch all history for all branches and tags. Need this for proper versioning.
fetch-depth: 0
- name: Set up Go
@ -40,6 +47,13 @@ jobs:
- name: Build CLI
run: make build
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: neo-go-binaries-ubuntu
path: ./bin/neo-go
if-no-files-found: error
build_cli_wsc:
name: Build CLI (Windows Server Core)
runs-on: windows-2022
@ -47,6 +61,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.ref }}
fetch-depth: 0
- name: Set up Go
@ -66,6 +81,13 @@ jobs:
- name: Build CLI
run: make build
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: neo-go-binaries-wsc
path: ./bin/neo-go.exe
if-no-files-found: error
build_image_ubuntu:
needs: build_cli_ubuntu
name: Build Docker image (Ubuntu)
@ -74,6 +96,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.ref }}
fetch-depth: 0
- name: Build Docker image
@ -87,6 +110,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.ref }}
fetch-depth: 0
- name: Build Docker image

View file

@ -34,21 +34,12 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout (manual run)
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.ref }}
# Allows to fetch all history for all branches and tags. Need this for proper versioning.
fetch-depth: 0
- name: Checkout (automatical run)
if: ${{ github.event_name != 'workflow_dispatch' }}
uses: actions/checkout@v2
with:
# Allows to fetch all history for all branches and tags. Need this for proper versioning.
fetch-depth: 0
- name: Sync VM submodule
run: |
git submodule sync
@ -76,21 +67,12 @@ jobs:
name: Publish Ubuntu-based image to DockerHub
runs-on: ubuntu-20.04
steps:
- name: Checkout (manual run)
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.ref }}
# Allows to fetch all history for all branches and tags. Need this for proper versioning.
fetch-depth: 0
- name: Checkout (automatical run)
if: ${{ github.event_name != 'workflow_dispatch' }}
uses: actions/checkout@v2
with:
# Allows to fetch all history for all branches and tags. Need this for proper versioning.
fetch-depth: 0
- name: Build image
run: make image
@ -117,21 +99,12 @@ jobs:
runs-on: windows-2022
steps:
- name: Checkout (manual run)
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.ref }}
# Allows to fetch all history for all branches and tags. Need this for proper versioning.
fetch-depth: 0
- name: Checkout (automatical run)
if: ${{ github.event_name != 'workflow_dispatch' }}
uses: actions/checkout@v2
with:
# Allows to fetch all history for all branches and tags. Need this for proper versioning.
fetch-depth: 0
- name: Sync VM submodule
run: |
git submodule sync
@ -162,21 +135,12 @@ jobs:
name: Publish WindowsServerCore-based image to DockerHub
runs-on: windows-2022
steps:
- name: Checkout (manual run)
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.ref }}
# Allows to fetch all history for all branches and tags. Need this for proper versioning.
fetch-depth: 0
- name: Checkout (automatical run)
if: ${{ github.event_name != 'workflow_dispatch' }}
uses: actions/checkout@v2
with:
# Allows to fetch all history for all branches and tags. Need this for proper versioning.
fetch-depth: 0
- name: Build image
run: make image-wsc