Skip to content

Release

Release #54

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
tag:
description: "Version Tag (vX.X.X)"
type: string
required: true
prerelease:
type: boolean
required: false
default: yes
jobs:
build:
name: Build
runs-on: macos-latest
steps:
# Fetch depth 0 is required for Changelog generation
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup go
uses: actions/setup-go@v2
with:
go-version: 1.18.0-beta1
stable: false
- name: Go Test
run: |
go test
- name: Cross Build
# You may pin to the exact commit or the version.
run: |
brew install filosottile/musl-cross/musl-cross
brew install libx11
ln -s /opt/X11/include/X11 /usr/local/include/X11
make all
- name: Create Tag
uses: negz/create-tag@v1
with:
version: ${{ github.event.inputs.tag }}
message: "create tag"
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create changelog text
id: changelog
uses: loopwerk/tag-changelog@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Print changelog
run: |
cat <<EOF
${{ steps.changelog.outputs.changes }}
EOF
- name: Release & Assets
uses: Hs1r1us/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# The name of the tag
tag_name: ${{ github.event.inputs.tag }}
# The name of the release
release_name: Upgit ${{ github.event.inputs.tag }}
# Text describing the contents of the tag
body: ${{ steps.changelog.outputs.changes }}
# The path to the asset you want to upload
asset_files: dist/
# `true` to create a draft (unpublished) release, `false` to create a published one. Default: `false`
draft: false
# `true` to identify the release as a prerelease. `false` to identify the release as a full release. Default: `false`
prerelease: ${{ github.event.inputs.prerelease }}