Skip to content

Commit

Permalink
Merge branch 'github-release'
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-abrahamsson committed Jan 19, 2021
2 parents 1afe7c5 + 7d92b4c commit 8de693b
Show file tree
Hide file tree
Showing 5 changed files with 544 additions and 445 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- '[0-9]*.[0-9]*'

name: Create a release

jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create a .tar.gz
run: |
set -xv
t=${{ github.event.ref }}
vsn=${t##*/}
echo "vsn=$vsn" >> $GITHUB_ENV
./helpers/export-from-git --override-version=$vsn
./helpers/extract-top-changelog-entry > release-descr.txt
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.vsn }}
release_name: Release ${{ env.vsn }}
draft: false
prerelease: false
body_path: release-descr.txt
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# This pulls from the CREATE RELEASE step above, referencing it's ID
# to get its outputs object, which include a `upload_url`. See this
# blog post for more info:
# https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./gpb-${{ env.vsn }}.tar.gz
asset_name: gpb-${{ env.vsn }}.tar.gz
asset_content_type: application/gzip
Loading

0 comments on commit 8de693b

Please sign in to comment.