Skip to content

Commit

Permalink
Merge pull request #35 from MarvNC:MarvNC/issue28
Browse files Browse the repository at this point in the history
Add Workflow for Daily Builds
  • Loading branch information
MarvNC authored Feb 4, 2024
2 parents 2dcb073 + eff0a95 commit 5c85ce4
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/daily-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build and Release Dictionaries Daily

on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:

jobs:
build-release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Dependencies
run: npm ci

- name: Get Current Date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"

- name: Download Latest CSVs
run: npm run download

- name: Build Dictionary
run: npm run buildTermDict

- name: Create and Publish Release
uses: softprops/action-gh-release@v1
with:
files: dist/*
tag_name: ${{ steps.date.outputs.date }}
name: ${{ steps.date.outputs.date }}
token: ${{ secrets.GITHUB_TOKEN }}
body: |
This is an automated release of the latest Words.hk for Yomitan.
For more information, please see the [README](https://github.com/MarvNC/wordshk-yomitan).
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"scripts": {
"download": "node src/downloadLatest.js",
"buildTermDict": "node src/convertToTermDictionary.js",
"buildLatest": "npm run download && npm run buildTermDict",
"buildFreq": "node src/convertToFrequencyDictionary.js",
"test": "ava"
},
Expand Down

0 comments on commit 5c85ce4

Please sign in to comment.