Create Release #144
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: Create Release | |
on: | |
push: | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Create Release | |
permissions: write-all | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y-%m-%d')" | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install deps | |
run: pip3 install -r requirements.txt | |
- name: Create archive | |
env: | |
GOOGLE_SERVICE_ACCOUNT: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }} | |
run: | | |
./update_from_doc.py > translate_cache.json | |
./translate.py --game-dir src_game --line-limit 300 | |
cd src_game && zip -r ../fear-and-hunger-2-ru.zip . | |
- name: Create Day Release | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
automatic_release_tag: ${{ steps.date.outputs.date }} | |
prerelease: false | |
files: fear-and-hunger-2-ru.zip | |
- name: Create Latest Release | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
automatic_release_tag: latest | |
prerelease: false | |
files: fear-and-hunger-2-ru.zip |