Merge pull request #3 from asachs01/naming_updates #6
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: Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version number for this release (e.g., v1.0.0)' | |
required: true | |
default: 'v1.0.0' | |
jobs: | |
release: | |
name: Create Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.21 | |
- name: Build binaries | |
run: | | |
GOOS=linux GOARCH=amd64 go build -o school_menu_connector-linux-amd64 | |
GOOS=linux GOARCH=arm64 go build -o school_menu_connector-linux-arm64 | |
GOOS=darwin GOARCH=amd64 go build -o school_menu_connector-darwin-amd64 | |
GOOS=darwin GOARCH=arm64 go build -o school_menu_connector-darwin-arm64 | |
GOOS=windows GOARCH=amd64 go build -o school_menu_connector-windows-amd64.exe | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
with: | |
tag_name: ${{ github.event.inputs.version || github.ref }} | |
release_name: Release ${{ github.event.inputs.version || github.ref }} | |
draft: false | |
prerelease: false | |
- name: Upload Linux AMD64 Binary | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./school_menu_connector-linux-amd64 | |
asset_name: school_menu_connector-linux-amd64 | |
asset_content_type: application/octet-stream | |
- name: Upload Linux ARM64 Binary | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./school_menu_connector-linux-arm64 | |
asset_name: school_menu_connector-linux-arm64 | |
asset_content_type: application/octet-stream | |
- name: Upload macOS AMD64 Binary | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./school_menu_connector-darwin-amd64 | |
asset_name: school_menu_connector-darwin-amd64 | |
asset_content_type: application/octet-stream | |
- name: Upload macOS ARM64 Binary | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./school_menu_connector-darwin-arm64 | |
asset_name: school_menu_connector-darwin-arm64 | |
asset_content_type: application/octet-stream | |
- name: Upload Windows AMD64 Binary | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./school_menu_connector-windows-amd64.exe | |
asset_name: school_menu_connector-windows-amd64.exe | |
asset_content_type: application/octet-stream |