Build and Release Dictionaries #411
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 | |
on: | |
schedule: | |
- cron: '0 5 * * *' # Runs at 5am UTC after the JMdict files are updated | |
workflow_dispatch: # Allows manually triggering the workflow | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v2 | |
- name: Get Current Date | |
id: date | |
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT | |
- name: Run Build Dicts Script | |
run: | | |
bash src/build_dicts.sh | |
- name: Add Updates | |
run: | | |
bun run start | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: dst/* | |
tag_name: ${{ steps.date.outputs.date }} | |
name: ${{ steps.date.outputs.date }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
body: | | |
This is an automated release of the dictionaries for ${{ steps.date.outputs.date }}. | |
For information on how to use these dictionaries, please see the [README](https://github.com/MarvNC/jmdict-yomitan). |