Skip to content

add more demo videos #46

add more demo videos

add more demo videos #46

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
permissions:
contents: read
jobs:
ci:
name: Fmt Lint Test Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Setup Task
uses: arduino/setup-task@v2
- name: Run fmt check
run: task fmt:check
- name: Run lint
run: task lint
- name: Run test
run: task test
- name: Run build
run: task build
packages:
name: Package ${{ matrix.goos }}-${{ matrix.goarch }}
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: ci
strategy:
fail-fast: false
matrix:
include:
- goos: linux
goarch: amd64
- goos: linux
goarch: arm64
- goos: darwin
goarch: amd64
- goos: darwin
goarch: arm64
- goos: windows
goarch: amd64
- goos: windows
goarch: arm64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Setup Task
uses: arduino/setup-task@v2
- name: Set version
run: echo "VERSION=${GITHUB_REF_NAME}" >> "$GITHUB_ENV"
- name: Build package
run: task package GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} PACKAGE_NAME=cws_${VERSION}_${{ matrix.goos }}_${{ matrix.goarch }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: cws_${{ env.VERSION }}_${{ matrix.goos }}_${{ matrix.goarch }}
path: dist/cws_${{ env.VERSION }}_${{ matrix.goos }}_${{ matrix.goarch }}.*
if-no-files-found: error
release:
name: Publish Release
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: packages
permissions:
contents: write
steps:
- name: Download packaged artifacts
uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Publish GitHub release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
generate_release_notes: true
files: dist/*