Skip to content

Commit

Permalink
Merge pull request #13 from lgc2333/master
Browse files Browse the repository at this point in the history
auto release
  • Loading branch information
LxHTT authored Mar 19, 2023
2 parents eae4ed1 + b2ce7eb commit 0df1422
Showing 1 changed file with 45 additions and 8 deletions.
53 changes: 45 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@ name: Build with Nuitka

on: [push, workflow_dispatch]

permissions: write-all

jobs:
build:

build:
strategy:
fail-fast: false

matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
os:
- macos-latest
- ubuntu-latest
- windows-latest

runs-on: ${{ matrix.os }}

Expand All @@ -22,12 +28,6 @@ jobs:
python-version: '3.9'
architecture: 'x64'

# - name: Set up GCC
# uses: egor-tensin/setup-gcc@v1
# with:
# version: latest
# platform: x64

- name: Install Necessary Packages
run: |
python -m pip install poetry pip setuptools tomlkit imageio -U
Expand All @@ -37,6 +37,7 @@ jobs:
run: |
sudo apt-get install -y libfuse2
# todo: 使用 pdm
# win 上 poetry 的奇怪 bug 导致 poetry install 装不上依赖
- name: Install Project Deps
run: |
Expand All @@ -63,3 +64,39 @@ jobs:
build/*.bin
build/*.app/**/*
release:
runs-on: ubuntu-latest

needs:
- build

steps:
- uses: szenius/set-timezone@v1.0
with:
timezoneLinux: "Asia/Shanghai"

- name: Install Tools
run: sudo apt install p7zip-full -y

- name: Download Artifacts
uses: actions/download-artifact@v3

- name: Compress Artifacts
run: |
for name in ./*
do 7z a "${name}.zip" "./${name}/*"
done
- name: Get Time
run: |
echo "TAG_TIME=$(date +"%Y%m%d%H%M%S")" >> $GITHUB_ENV
echo "DISPLAY_TIME=$(date +"%Y-%m-%d %H:%M:%S")" >> $GITHUB_ENV
- name: Create GitHub Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ env.TAG_TIME }}
prerelease: true
title: Auto Release ${{ env.DISPLAY_TIME }}
files: '*.zip'

0 comments on commit 0df1422

Please sign in to comment.