Skip to content

Update release.yml

Update release.yml #6

Workflow file for this run

name: CI-Release
on:
push:
tags:
- '*.*.*'
- '*.*.*-*.*'
jobs:
build-win64-release:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11.0
cache: pip
architecture: x64
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r ./requirements310_win.txt
- name: Run packing
run: |
cp ./OlivOS/hook.py ./OlivOS/hook_bak.py
cp ./OlivOS/hook_pack.py ./OlivOS/hook.py
pyinstaller ./main.spec
- name: Run artifact
run: |
mkdir OlivOS-Win
cp ./dist/main.exe ./OlivOS-win/OlivOS.exe
- name: Upload Artifact OlivOS
uses: actions/upload-artifact@v4
with:
name: OlivOS-Win
path: ./OlivOS-Win
build-linux-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.10.8
cache: pip
architecture: x64
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r ./requirements310.txt
- name: Run packing
run: |
cp ./OlivOS/hook.py ./OlivOS/hook_bak.py
cp ./OlivOS/hook_pack_debug.py ./OlivOS/hook.py
pyinstaller ./main_linux.spec
- name: Run artifact
run: |
mkdir OlivOS-PKG
cp ./dist/main ./OlivOS-PKG/OlivOS
- name: Upload Artifact OlivOS
uses: actions/upload-artifact@v4
with:
name: OlivOS-Linux
path: ./OlivOS-PKG
release-draft:
runs-on: ubuntu-latest
needs:
- build-win64-release
- build-linux-release
permissions:
contents: write
steps:
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: OlivOS-Win
path: OlivOS-Win/
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: OlivOS-Win-32-old
path: OlivOS-Win-32-old/
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: OlivOS-Linux
path: OlivOS-Linux/
- name: Packing Release
run: |
cd ./OlivOS-Win
zip -r ../OlivOS-Win.zip ./
cd ../
cp ./OlivOS-Win.zip ./OlivOS-Win-${{ github.ref_name }}.zip
cd ./OlivOS-Win-32-old
zip -r ../OlivOS-Win-32-old.zip ./
cd ../
cp ./OlivOS-Win-32-old.zip ./OlivOS-Win-32-old-${{ github.ref_name }}.zip
cd ./OlivOS-Linux
zip -r ../OlivOS-Linux.zip ./
cd ../
cp ./OlivOS-Linux.zip ./OlivOS-Linux-${{ github.ref_name }}.zip
ls -R
- name: Create Draft Release
uses: ncipollo/release-action@v1
with:
tag: ${{ github.ref_name }}
draft: true
artifacts: |
./OlivOS-Win.zip
./OlivOS-Win-${{ github.ref_name }}.zip
./OlivOS-Linux.zip
./OlivOS-Linux-${{ github.ref_name }}.zip
token: ${{ secrets.GITHUB_TOKEN }}