Skip to content

fix deplay.yml?

fix deplay.yml? #5

Workflow file for this run

name: Deploy
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22.*'
- name: Build for ${{ matrix.os }}
run: |
case ${{ matrix.os }} in
ubuntu-latest)
go build -o addframe-linux
;;
windows-latest)
go build -o addframe.exe
;;
macos-latest)
go build -o addframe
;;
esac
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: addframe-${{ matrix.os }}
path: |
${{ matrix.os == 'windows-latest' && 'addframe.exe' || 'addframe' }}
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: ./artifacts
- name: Release
uses: softprops/action-gh-release@v1
with:
files: ./artifacts/addframe-*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}