Skip to content

Commit

Permalink
release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
justinh-rahb authored Sep 25, 2023
1 parent b3b5efd commit a3a4ced
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 2 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build and Release

on:
push:
tags:
- 'v*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Build
run: |
go build -o member-counts ./...
env:
GO111MODULE: on

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload Release Asset
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
asset_name: member-counts
asset_content_type: application/octet-stream
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Environment variables are used to configure the application. They can be set in
```sh
git clone https://github.com/RAHB-REALTORS-Association/member-counts-go.git
cd member-counts-go
go build
go build -o member-counts
```

Before running, ensure that the environment variables are correctly set, either in your environment or in a `.env` file in the project directory.
Expand All @@ -33,7 +33,7 @@ Before running, ensure that the environment variables are correctly set, either
Once configured and built, run the application using:

```sh
./main
./member-counts
```

The application will refresh the specified Redash query, fetch the resulting data, process it to calculate the total member counts, and send this count to the specified Google Chat Webhook.
Expand Down

0 comments on commit a3a4ced

Please sign in to comment.