fix deplay.yml #2
Workflow file for this run
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 Deploy Go Program | |
on: | |
push: | |
tags: | |
- '*' # すべてのタグがプッシュされたときに実行 | |
jobs: | |
build: | |
name: Build and Deploy | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] # macOS を対象外に | |
go-version: [1.22.*] | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Set up Go | |
uses: actions/[email protected] | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Build binary | |
run: | | |
go build -o output/${{ matrix.os }}/addframe | |
- name: Archive binary | |
uses: actions/[email protected] | |
with: | |
name: addframe-${{ matrix.os }} | |
path: output/${{ matrix.os }}/addframe | |
deploy: | |
name: Deploy binaries | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download binaries | |
uses: actions/download-artifact@v3 | |
with: | |
name: addframe-ubuntu-latest | |
- name: Deploy to GitHub Releases | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: output/ubuntu-latest/addframe | |
- name: Download binaries (Windows) | |
uses: actions/download-artifact@v3 | |
with: | |
name: addframe-windows-latest | |
- name: Deploy to GitHub Releases (Windows) | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: output/windows-latest/addframe.exe |