GitHub Actions release automation (#1962)

This commit is contained in:
Ștefan Talpalaru 2020-11-06 13:17:22 +01:00 committed by GitHub
parent d63aeb0f8e
commit 3a891c708e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 40 additions and 0 deletions

40
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,40 @@
on:
push:
tags:
- 'v*' # "v1.2.3"
name: Upload Release Asset
jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build project
id: build_linux
run: |
make dist
cd dist
echo "::set-output name=linux_amd64_archive::"$(echo nimbus-eth2_Linux_amd64_*.tar.gz)
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/${{ steps.build_linux.outputs.linux_amd64_archive }}
asset_name: ${{ steps.build_linux.outputs.linux_amd64_archive }}
asset_content_type: application/gzip