Skip to content

Merge pull request #233 from ericzbeard/fix-208 #31

Merge pull request #233 from ericzbeard/fix-208

Merge pull request #233 from ericzbeard/fix-208 #31

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+=("$zip")
done
gh release upload "${GITHUB_REF##*/}" "${assets[@]}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}