Build Release #26
Workflow file for this run
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 Release | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
build-ankiaddon: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set env | |
shell: bash | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Create dist folder | |
shell: bash | |
run: | | |
mkdir dist | |
- name: Set version | |
shell: bash | |
run: | | |
echo "VERSION_STRING = '${{ env.RELEASE_VERSION }}'" > addon/version.py | |
- name: Download KanjiVG | |
shell: bash | |
run: | | |
bash tools/kanjivg_download.sh | |
- name: Modify KanjiVG | |
shell: bash | |
run: | | |
python3 tools/kanjivg_cleanup.py | |
- name: Zip | |
shell: bash | |
run: | | |
cd addon | |
zip -r ../dist/MigakuKanjiGOD.ankiaddon . -x user_files/\* meta.json | |
cd .. | |
- name: Upload artifacts | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "dist/*" | |
allowUpdates: true | |
token: ${{ secrets.GITHUB_TOKEN }} |