Skip to content

release

release #19

Workflow file for this run

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: Get doduda
env:
GH_TOKEN: ${{ github.token }}
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 }}"}'