GitHub Actions release automation (#1962)
This commit is contained in:
parent
d63aeb0f8e
commit
3a891c708e
|
@ -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
|
||||
|
Loading…
Reference in New Issue