Build and Release Dictionaries Daily #2
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: 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: Download Latest CSVs | |
run: npm run download | |
- name: Build Dictionary | |
run: npm run buildTermDict | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: dist | |
path: dist/* | |
publish-release: | |
needs: build-release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download Artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
name: dist | |
path: dist | |
- name: Get Current Date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y-%m-%d')" | |
- 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). |