Skip to content

Merge pull request #618 from ericzbeard/v-1-20-1 #54

Merge pull request #618 from ericzbeard/v-1-20-1

Merge pull request #618 from ericzbeard/v-1-20-1 #54

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@v4
- name: Install dependencies
run: |
apt-get update
apt-get install -y zip
- name: Build
run: ./.github/workflows/build.sh
- uses: actions/upload-artifact@v4
with:
name: dist
path: ./dist/*.zip
release:
name: Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/download-artifact@v4.1.7
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 }}