Release #34
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: Release | |
on: | |
schedule: | |
- cron: "0 0 * * 1" # Runs every Monday at midnight UTC | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-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.23" | |
- name: Install dependencies | |
run: go mod download | |
- name: Run Go app | |
run: DISABLE_PROGRESS=true go run main.go | |
- name: Compress output | |
run: gzip out.db | |
- name: Create Release and Upload Asset | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
tag_name="release-${{ github.run_number }}" | |
release_name="Estonian Companies Data $(date +'%Y-%m-%d %H-%M')" | |
gh release create "$tag_name" \ | |
--title "$release_name" \ | |
--notes "Latest data about every Estonian company in one SQLite database" \ | |
out.db.gz |