Build and Release Dictionaries Daily #366
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 | |
- 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 }}. |