Merge pull request #63 from fabianoflorentino/development #19
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: Windows | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'README.md' | |
- 'LICENSE' | |
- 'docs/**' | |
- '.github/**' | |
jobs: | |
build: | |
name: Windows | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.22.8' | |
- name: Build for Windows | |
run: | | |
GOOS=windows GOARCH=amd64 go build -o aprendago.exe cmd/aprendago/main.go | |
- name: Upload Windows build artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: aprendago.exe | |
path: aprendago.exe | |
release: | |
name: Create GitHub Release | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Download Windows build artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: aprendago.exe | |
path: ./artifacts | |
- name: Create GitHub Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v0.1.${{ github.run_number }}-windows | |
release_name: v0.1.${{ github.run_number }}-windows | |
draft: false | |
prerelease: false | |
- name: Upload Windows asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./artifacts/aprendago.exe | |
asset_name: aprendago.exe | |
asset_content_type: application/octet-stream |