Merge pull request #13 from wesionaryTEAM/main #44
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 Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
name: Build and Release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '^1.21' | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Build Binary for Linux | |
run: GOOS=linux GOARCH=amd64 go build -o geng-linux-amd64 . | |
- name: Build Binary for Windows | |
run: GOOS=windows GOARCH=amd64 go build -o geng-windows-amd64.exe . | |
- name: Build Binary for macOS | |
run: GOOS=darwin GOARCH=amd64 go build -o geng-darwin-amd64 . | |
- name: Create Release | |
id: create_release | |
uses: joutvhu/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
name: Release ${{ github.ref_name }} | |
draft: false | |
prerelease: false | |
make_latest: true | |
- name: Upload Linux Binary | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./geng-linux-amd64 | |
asset_name: geng-linux-amd64 | |
asset_content_type: application/octet-stream | |
- name: Upload Windows Binary | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./geng-windows-amd64.exe | |
asset_name: geng-windows-amd64.exe | |
asset_content_type: application/octet-stream | |
- name: Upload macOS Binary | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./geng-darwin-amd64 | |
asset_name: geng-darwin-amd64 | |
asset_content_type: application/octet-stream |