Skip to content

Add config sample pptx #30

Add config sample pptx

Add config sample pptx #30

Workflow file for this run

name: Build
on: [push]
jobs:
test:
name: Test
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Unit Tests
run: go test ./src/...
- name: Integration Tests
run: go test ./tests/...
build:
name: Build
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Set Build Variables
run: |
version=$(date '+%y%m%d-%H%M%S')
echo version=$version >> $GITHUB_ENV
echo asset=robobackup-v$version >> $GITHUB_ENV
echo ldflags="-s -w -X 'github.com/aicirt2012/robobackup/sys/build.version=$version'" >> $GITHUB_ENV
- name: Build
run: env GOOS=windows GOARCH=amd64 go build -ldflags "$ldflags" -o ./$asset/windows/robobackup.exe main.go
- name: Upload Asset
uses: actions/upload-artifact@v3
env:
asset: ${{ env.asset }}
with:
name: ${{ env.asset }}.zip
path: ${{ env.asset }}/
if-no-files-found: error