Create README.md #1
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
# This workflow will build a golang project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
name: Go | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21' | |
- name: Build for Windows | |
run: GOOS=windows GOARCH=amd64 go build -o ${{ github.event.repository.name }}.exe | |
- name: Build for macOS | |
run: GOOS=darwin GOARCH=amd64 go build -o ${{ github.event.repository.name }}_macos | |
- name: Build for Linux | |
run: GOOS=linux GOARCH=amd64 go build -o ${{ github.event.repository.name }}_linux | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v1.0.0 | |
release_name: Release v1.0.0 - ${{ github.event.repository.name }} | |
body: | | |
- Compare file via the CLI itself with --reference and given files as argument. | |
- Compare files with a configuration files, utilizing patterns the subfolders. | |
draft: false | |
prerelease: false | |
- name: Upload Release Assets | |
id: upload_release_assets | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./${{ github.event.repository.name }}.exe | |
asset_name: ${{ github.event.repository.name }}.exe | |
asset_content_type: application/octet-stream | |
- name: Upload Release Assets | |
id: upload_release_assets_macos | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./${{ github.event.repository.name }}_macos | |
asset_name: ${{ github.event.repository.name }}_macos | |
asset_content_type: application/octet-stream | |
- name: Upload Release Assets | |
id: upload_release_assets_linux | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./${{ github.event.repository.name }}_linux | |
asset_name: ${{ github.event.repository.name }}_linux | |
asset_content_type: application/octet-stream |