Skip to content

Update README.md

Update README.md #51

name: Go
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
paths:
- 'go/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
- name: Build
run: |
cd go
mkdir -p build
go build -mod=readonly -o build/whatsmyderverdoing-connector main.go
- name: Archive build artifacts
if: always()
uses: actions/upload-artifact@v3
with:
name: whatsmyderverdoing-connector-linux
path: go/build
release:
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: whatsmyderverdoing-connector-linux
path: build
- name: Update GitHub Release
uses: softprops/action-gh-release@v1
with:
files: |
build/whatsmyderverdoing-connector
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: latest