Skip to content

feat: introduce home path #23

feat: introduce home path

feat: introduce home path #23

Workflow file for this run

name: Build and Release
on:
push:
branches:
- main
tags:
- 'v*.*.*'
pull_request:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, darwin, windows]
goarch: [amd64, arm64]
include:
- goos: windows
extension: .exe
- goos: linux
extension: ''
- goos: darwin
extension: ''
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: |
cd FileBox
npm install
- name: Build React app
run: |
cd FileBox
npm run build
- name: Build Go binary
run: |
mkdir -p bin
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o bin/FileBox-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.extension }} ./main.go
- name: Create changelog text
if: startsWith(github.ref, 'refs/tags/')
id: changelog
uses: loopwerk/tag-changelog@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Release Asset
if: startsWith(github.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: bin/FileBox-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.extension }}
asset_name: FileBox-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.extension }}
tag: ${{ github.ref }}
overwrite: true
body: ${{ steps.changelog.outputs.changes }}