Skip to content

Update PyPI upload scripts #142

Update PyPI upload scripts

Update PyPI upload scripts #142

Workflow file for this run

name: "ci"
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
on:
push:
branches:
- "main"
- "develop"
jobs:
pre-release:
name: "Pre Release"
runs-on: "windows-2019" # Windows 10, VS 2019
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build
- name: create source assets zip
run: 7z.exe a -tzip -mx=9 dist/builtin-assets.zip assets/*
- name: Detecting version
id: vars
shell: bash
run: |
echo "version_tag=$(python3 ./.github/workflows/printversion.py)" >> $GITHUB_OUTPUT
- name: Print version
run: echo "${{ steps.vars.outputs.version_tag }}"
- name: install pyinstaller
run: pip install pyinstaller
- name: create versionfiles
run: |
python3 ./versionfile_gen.py versionfile_cli.txt preppipe_cli.exe --cli
python3 ./versionfile_gen.py versionfile_gui.txt preppipe.exe
- name: run pyinstaller
run: |
pyinstaller preppipe.spec
cd dist/preppipe && 7z.exe a -t7z -mx=9 ../preppipe-windows-x64.7z * && cd ../..
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest-${{ env.BRANCH_NAME }}"
prerelease: true
title: "${{ steps.vars.outputs.version_tag }} 最新版本 (Latest build) - ${{ env.BRANCH_NAME }}"
files: |
dist/preppipe-windows-x64.7z
dist/*.whl
dist/builtin-assets.zip
# make this a separate job so that if this step fails (e.g., due to permission settings issue),
# we don't have to re-run pre-release when only this step is needed
request-all-in-one-build:
name: "Request rebuilding the all-in-one package"
needs: pre-release
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.PREPPIPE_ALL_IN_ONE_PAT }}
repository: PrepPipe/preppipe-latest-all-in-one
event-type: update-request
#sync2gitee:
# name: "Sync to Gitee"
# runs-on: ubuntu-latest
# steps:
# - name: Organization mirror
# uses: Yikun/hub-mirror-action@master
# with:
# src: github/preppipe
# dst: gitee/preppipe
# dst_key: ${{ secrets.GITEE_PRIVATE_KEY }}
# dst_token: ${{ secrets.GITEE_TOKEN }}
# account_type: org
# force_update: true