Skip to content

Build and Release Dictionaries Daily #345

Build and Release Dictionaries Daily

Build and Release Dictionaries Daily #345

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
- uses: oven-sh/setup-bun@v2
- name: Fetch Latest Dump
run: sh ./src/fetch-cedict.sh
- name: Get Current Date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Install Dependencies and Build
run: |
bun install --frozen-lockfile
bun run start
- name: Create and Publish Release
uses: softprops/action-gh-release@v2
with:
files: build/*
tag_name: ${{ steps.date.outputs.date }}
name: ${{ steps.date.outputs.date }}
token: ${{ secrets.GITHUB_TOKEN }}
body: |
This is an automated release of the latest CC-CEDICT dictionaries for ${{ steps.date.outputs.date }}.