Skip to content

Build and Release

Build and Release #3

Workflow file for this run

name: Build and Release
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
path: with_golang
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Build
run: |
cd ./with_golang/
chmod +x ./build.sh
./build.sh autoradius.go
release:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push' && github.ref == 'refs/tags/*'
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Artifact
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: /main-repo/with-golang/autoradius
asset_name: autoradius
asset_content_type: application/octet-stream