Merge pull request #9 from RAHB-REALTORS-Association/dependabot/go_mo… #9
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 | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20' | |
check-latest: true | |
cache-dependency-path: | | |
subdir/go.sum | |
tools/go.sum | |
- name: Build for Linux | |
run: go build -o member-counts-go ./... | |
- name: Build for Mac | |
run: GOOS=darwin GOARCH=amd64 go build -o member-counts-go-mac ./... | |
- name: Build for Windows | |
run: GOOS=windows GOARCH=amd64 go build -o member-counts-go.exe ./... | |
- name: Create Release | |
id: create_release | |
uses: ncipollo/release-action@v1 | |
with: | |
name: ${{ github.ref_name }} | |
body: "## Release: ${{ github.ref_name }}" | |
tag: ${{ github.ref_name }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload Release Asset (Linux) | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./member-counts-go | |
asset_name: member-counts-go | |
asset_content_type: application/octet-stream | |
- name: Upload Release Asset (Mac) | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./member-counts-go-mac | |
asset_name: member-counts-go-mac | |
asset_content_type: application/octet-stream | |
- name: Upload Release Asset (Windows) | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./member-counts-go.exe | |
asset_name: member-counts-go.exe | |
asset_content_type: application/octet-stream |