Merge pull request #64 from fabianoflorentino/development #20
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: macOS | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'README.md' | |
- 'LICENSE' | |
- 'docs/**' | |
- '.github/**' | |
jobs: | |
build: | |
name: Build for macOS | |
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 macOS | |
run: | | |
GOOS=linux GOARCH=amd64 go build -o aprendago cmd/aprendago/main.go | |
- name: Upload macOS build artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: aprendago | |
path: aprendago | |
release: | |
name: Create GitHub Release | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Download macOS build artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: aprendago | |
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 }}-macos | |
release_name: v0.1.${{ github.run_number }}-macos | |
draft: false | |
prerelease: false | |
- name: Upload macOS 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 | |
asset_name: aprendago | |
asset_content_type: application/octet-stream |