Skip to content

修复翻译错误 #148

修复翻译错误

修复翻译错误 #148

Workflow file for this run

# SPDX-FileCopyrightText: 2022 Gonzalo López <[email protected]>
#
# SPDX-License-Identifier: MIT
name: build
# inspired from https://github.com/wkentaro/labelme/actions/runs/255102432/workflow
on:
push:
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
include:
- os: windows-latest
path: ~\AppData\Local\pip\Cache
python-version: ['3.9']
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python
shell: bash -l {0}
env:
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
LC_ALL: C.UTF-8
LANG: C.UTF-8
run: |
which python
python --version
pip --version
pip install -r requirements.txt
pip install PyInstaller html5lib cssselect
- name: Install dependencies
shell: bash -l {0}
run: |
pip install third-party/pylzma/pylzma-0.5.0-cp39-cp39-win_amd64.whl
- name: Run installer
shell: bash -l {0}
run: |
# Build the standalone executable
python setup.py create_installer
- name: Get version
run: |
$VERSION = Get-Content -Encoding UTF8 cddagl/VERSION
echo "VERSION=$VERSION" | Out-File -Append -Encoding UTF8 $Env:GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ env.VERSION }}
release_name: Release v${{ env.VERSION }}
draft: false
prerelease: true
- name: Upload Portable Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/cddagl_portable_v${{ env.VERSION }}.zip
asset_name: cddagl_portable_v${{ env.VERSION }}.zip
asset_content_type: application/zip
- name: Upload Installer Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/innosetup/cddagl_installer_v${{ env.VERSION }}.exe
asset_name: cddagl_installer_v${{ env.VERSION }}.exe
asset_content_type: application/octet-stream