Refactored code to use locks when accessing shared data and removed d… #3
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: Go | |
on: | |
push: | |
tags: | |
- '*' | |
env: | |
GOOS: linux | |
GOARCH: amd64 | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Extract version | |
id: get_version | |
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.20.1 | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
- name: Get dependencies | |
run: go mod download | |
- name: Build | |
run: go build -o linux-main-${{ steps.get_version.outputs.VERSION }} | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: linux-main-${{ steps.get_version.outputs.VERSION }} | |
path: ./linux-main-${{ steps.get_version.outputs.VERSION }} | |
build-windows: | |
needs: build | |
runs-on: windows-latest | |
steps: | |
- name: Extract version | |
id: get_version | |
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.20.1 | |
- name: Get dependencies | |
run: go mod download | |
- name: Build | |
run: go build -o win-main-${{ steps.get_version.outputs.VERSION }}.exe | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: win-main-${{ steps.get_version.outputs.VERSION }}.exe | |
path: ./win-main-${{ steps.get_version.outputs.VERSION }}.exe | |
build-mac: | |
needs: build | |
runs-on: macos-latest | |
steps: | |
- name: Extract version | |
id: get_version | |
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.20.1 | |
- name: Get dependencies | |
run: go mod download | |
- name: Build | |
run: go build -o mac-main-${{ steps.get_version.outputs.VERSION }} | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: mac-main-${{ steps.get_version.outputs.VERSION }} | |
path: ./mac-main-${{ steps.get_version.outputs.VERSION }} |