Skip to content

Merge pull request #195 from ericzbeard/release-v150 #24

Merge pull request #195 from ericzbeard/release-v150

Merge pull request #195 from ericzbeard/release-v150 #24

Workflow file for this run

on:
push:
tags:
- 'v*'
name: Create release from tag
jobs:
build:
name: Build
runs-on: ubuntu-latest
defaults:
run:
shell: bash
container: golang:latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: |
apt-get update
apt-get install -y zip
- name: Build
run: ./.github/workflows/build.sh
- uses: actions/upload-artifact@v2
with:
name: dist
path: ./dist/*.zip
release:
name: Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/download-artifact@v2
with:
name: dist
path: dist
- run: |
set -x
(echo "${GITHUB_REF##*/}"; echo; git cherry -v "$(git describe --abbrev=0 HEAD^)" | cut -d" " -f3-) > CHANGELOG
assets=()
for zip in ./dist/*.zip; do
assets+=("-a" "$zip")
done
hub release edit "${assets[@]}" -m "" "${GITHUB_REF##*/}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}