Create a new release #14
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: Create a new release | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Create .env file | |
run: | | |
cp .env.example .env | |
sed -i 's/^DICT_NAME=.*/DICT_NAME=kty/' .env | |
- name: Install jq | |
run: sudo apt-get install -y jq | |
- name: Install gzip | |
run: sudo apt-get install -y gzip | |
- name: Install npm dependencies | |
run: npm install | |
- name: Run auto.sh script | |
run: ./auto.sh ? ? | |
- name: Run merge-ipa | |
run: node merge-ipa.js | |
- name: Generate list of .zip files | |
id: generate_file_list | |
run: | | |
find data/language -type f -name '*.zip' > zip_files.txt | |
cat zip_files.txt | |
echo "zip_files<<EOF" >> $GITHUB_OUTPUT | |
cat zip_files.txt >> $GITHUB_OUTPUT | |
echo "EOF" >> $GITHUB_OUTPUT | |
- name: Configure git | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
- name: Tag the repository | |
id: tag | |
run: | | |
# See https://docs.github.com/en/get-started/using-git/dealing-with-special-characters-in-branch-and-tag-names | |
TAG=v$(date -Iseconds | sed 's/[T:\+]/-/g') | |
echo "$TAG" | |
echo "tag=$TAG" >> $GITHUB_OUTPUT | |
git tag -a $TAG -m "Published version $TAG" ${GITHUB_SHA} | |
git push origin $TAG | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: Test auto release | |
tag_name: ${{ steps.tag.outputs.tag }} | |
prerelease: true | |
generate_release_notes: true | |
files: ${{ steps.generate_file_list.outputs.zip_files }} |