Fix: lang script, Makefile, and GH Actions #21
Workflow file for this run
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: Build Trains | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.12 | |
# I wish there could be an Action for this. | |
- name: Install Scoop - setup - build | |
shell: pwsh | |
run: | | |
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser | |
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression | |
scoop bucket add openttd https://github.com/WenSimEHRP/OpenTTD-Bucket | |
scoop install openttd/nml | |
scoop install openttd/gorender | |
make | |
- name: Get Date | |
id: date | |
shell: pwsh | |
run: echo "RELEASE_DATE=$(Get-Date -Format 'yyyy-MM-dd')" >> $env:GITHUB_ENV | |
- name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./chinasettrains.grf | |
asset_name: chinasettrains.grf | |
asset_content_type: application/octet-stream | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ env.RELEASE_DATE }} | |
release_name: Release ${{ env.RELEASE_DATE }} | |
draft: false | |
prerelease: true |