Skip to content

Release

Release #6

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: true
jobs:
build:
name: Build
runs-on: ubuntu-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.19.5
stable: false
- name: Go Test
run: |
make test
- name: Cross Build
# You may pin to the exact commit or the version.
run: |
make package
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Build UI
run: |
cd ui
yarn install
yarn build
zip -r flydav-ui-dist.zip dist
cp flydav-ui-dist.zip ../dist
- 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/Release-AIO@v1.0
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: ${{ 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 }}