Skip to content

Build and release #1246

Build and release

Build and release #1246

name: Build and release
on:
push:
branches:
- main
schedule:
- cron: '0 */6 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.12
- name: Make SRC directory
run: |
python parsing_lang.py
- name: Get version from ToolDelta repository
id: get_version
run: |
VERSION=$(curl -s https://raw.githubusercontent.com/ToolDelta/ToolDelta/main/version)
echo "::set-output name=version::$VERSION"
- name: Create version file
run: |
echo "${{ steps.get_version.outputs.version }}" > src/version
- name: Compress src directory
run: |
tar -czf ToolDelta_Game_Texts.tar src
- name: Optimize compression
run: |
gzip -9 ToolDelta_Game_Texts.tar
- name: Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_version.outputs.version }}
name: Release ${{ steps.get_version.outputs.version }}
files: ToolDelta_Game_Texts.tar.gz