Skip to content

Commit

Permalink
SAGE-515: add auto-release on version tag
Browse files Browse the repository at this point in the history
  • Loading branch information
jswantek committed Nov 13, 2020
1 parent 526fff3 commit b950c57
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

name: Create Release

jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-18.04
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
path: cboot
- name: Prep Build Environment
uses: actions/checkout@v2
with:
repository: waggle-sensor/nvidia_toolchain
ref: refs/heads/master
path: toolchain
lfs: true
- name: Build project
id: build_project
run: |
pushd ${{ github.workspace }}/toolchain
tar xf $(ls *.xz)
popd
pushd ${{ github.workspace }}/cboot
./build.sh -t ${{ github.workspace }}/toolchain/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu
gzip $(ls *.bin)
popd
echo "##[set-output name=cboot_gz_path;]$(ls cboot/*.gz)"
echo "##[set-output name=cboot_gz_name;]$(basename $(ls cboot/*.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: false
prerelease: false
- name: Upload Release Asset (Registration)
id: upload-release-asset-registration
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ steps.build_project.outputs.cboot_gz_path }}
asset_name: ${{ steps.build_project.outputs.cboot_gz_name }}
asset_content_type: application/gzip

0 comments on commit b950c57

Please sign in to comment.