-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from MarvNC/automate-release
Automate Releases from Tags
Showing
5 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Build and Release Dictionaries on Tag | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
build-release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up node environment | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '21' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build | ||
run: ./scripts/buildAll.sh | ||
|
||
- name: Create Release With gh CLI and Upload ./dist/*.zip | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ github.ref }} | ||
run: | | ||
gh release create "$tag" ./dist/*.zip --notes-from-tag |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ja,zh | ||
2022-12-01 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
# Read input from inputs.txt | ||
input_file="inputs.txt" | ||
IFS=',' read -r -a langs < <(sed -n '1p' "$input_file") | ||
date_val=$(sed -n '2p' "$input_file") | ||
|
||
# Format date for file naming | ||
dateFile=$(date -d "$date_val" +"%Y.%m.%d") | ||
|
||
# Output array and dateFile | ||
echo "langs array: ${langs[@]}" | ||
echo "date_val variable: $date_val" | ||
echo "dateFile variable: $dateFile" | ||
|
||
# For each lang, run downloadDump.sh with <lang> <dateFile> | ||
for lang in "${langs[@]}" | ||
do | ||
echo "Running downloadDump.sh with $lang and $dateFile" | ||
./scripts/downloadDump.sh "$lang" "$dateFile" | ||
done | ||
|
||
# Run node src/convertWikipedia.js with <lang> <date_val> for each lang | ||
for lang in "${langs[@]}" | ||
do | ||
echo "Running convertWikipedia.js with $lang and $date_val" | ||
node src/convertWikipedia.js "$lang" "$date_val" | ||
done |
File renamed without changes.
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