Backend implementation & more icons #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: 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 |