Skip to content

Release

Release #31

Workflow file for this run

name: Release
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run:
|
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run project command
run: python -m odg -r -c -s
- name: Release preparations
run:
|
cd itembuilds
zip -r ../itembuilds.zip .
cd ..
echo "RELEASE_NAME=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
echo "PREVIOUS_RELEASE_NAME=$(date -d yesterday +%Y-%m-%d)" >> $GITHUB_ENV
echo $(echo $PREVIOUS_RELEASE_NAME)
# - name: Generate diff file
# run:
# |
# curl -L -o "${{ env.PREVIOUS_RELEASE_NAME }}.zip" https://github.com/Egezenn/OpenDotaGuides/releases/latest/download/itembuilds.zip
# unzip "${{ env.PREVIOUS_RELEASE_NAME }}.zip" -d "${{ env.PREVIOUS_RELEASE_NAME }}"
# sh odg/generate_diff.sh "itembuilds" "${{ env.PREVIOUS_RELEASE_NAME }}"
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.RELEASE_NAME }}
body: Daily release
files: itembuilds.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Cleanup
run:
|
rm data itembuilds odg.log itembuilds.zip
# rm "${{ env.PREVIOUS_RELEASE_NAME }}.zip" comparison.diff