Skip to content

[TASK] updates user input validation to take more valid answers #24

[TASK] updates user input validation to take more valid answers

[TASK] updates user input validation to take more valid answers #24

Workflow file for this run

name: Go
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20' # specify the Go version
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...
- name: Build Binary for Linux
run: GOOS=linux GOARCH=amd64 go build -o wp-wingman main.go
- name: Install jq
run: sudo apt-get install -y jq
- name: Get latest release
id: latest_release
run: |
LATEST_RELEASE=$(curl --silent -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/releases/latest" | jq -r .upload_url | cut -d "{" -f 1)
echo "::set-output name=upload_url::$LATEST_RELEASE"
- name: Log asset_path and asset_name
run: |
echo "asset_path: ${{ inputs.asset_path }}"
echo "asset_name: ${{ inputs.asset_name }}"
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.latest_release.outputs.upload_url }}
asset_path: ./wp-wingman
asset_name: wp-wingman
asset_content_type: application/octet-stream