release #2
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: release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
type: string | |
description: The version that will be downloaded | |
required: true | |
jobs: | |
tag: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Tag snapshot | |
uses: tvdias/github-tagger@v0.0.1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
tag: "${{ github.event.inputs.version }}" | |
release: | |
needs: tag | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Prefetch docker images | |
run: | | |
docker pull stelzo/swf-to-svg:latest | |
docker pull stelzo/svg-to-png:latest | |
docker pull stelzo/doduda-umbu:amd64 | |
docker pull stelzo/assetstudio-cli:amd64 | |
- name: Get doduda | |
run: | | |
gh release download -R dofusdude/doduda -p "doduda_Linux_x86_64.tar.gz" | |
tar -xzf "doduda_Linux_x86_64.tar.gz" | |
chmod +x doduda | |
./doduda --version | |
- name: Download | |
run: ./doduda --headless --dofus-version ${{ github.event.inputs.version }} --output ./data | |
- name: Map | |
run: ./doduda map --headless --output ./data | |
- name: Package | |
run: | | |
mkdir out | |
mv data/*.json out/ | |
mv data/languages/*.json out/ | |
tar -czf items_images_64.tar.gz $(find data/img/item/1x -name "*.png") | |
mv items_images_64.tar.gz out/ | |
tar -czf items_images_128.tar.gz $(find data/img/item/2x -name "*.png") | |
mv items_images_128.tar.gz out/ | |
tar -czf mounts_images_64.tar.gz $(find data/img/mount/small -name "*.png") | |
mv mounts_images_64.tar.gz out/ | |
tar -czf mounts_images_256.tar.gz $(find data/img/mount/big -name "*.png") | |
mv mounts_images_256.tar.gz out/ | |
- name: Upload | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
title: "${{ github.event.inputs.version }}" | |
automatic_release_tag: "${{ github.event.inputs.version }}" | |
files: out/* | |
- name: Notify doduapi to update | |
run: | | |
curl -X POST \ | |
https://api.dofusdu.de/dofus3/v1/update/${{ secrets.DODUAPI_TOKEN }} \ | |
-d '{"version":"${{ github.event.inputs.version }}"}' |