Skip to content

Create ci.yml

Create ci.yml #1

Workflow file for this run

name: Build and Release DCinsideAlarm
on:
push:
branches:
- master
- arcalive
pull_request:
branches:
- master
- arcalive
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
activate-environment: py38
environment-file: environment.yml
python-version: 3.8.8
- name: Install dependencies
run: |
conda config --env --set subdir win-32
conda create -p ./py38 python=3.8.8 pip=21.0.1 -y
conda activate ./py38
set CONDA_SUBDIR=win-32
pip install -r requirements.txt
- name: Build executable
run: |
conda activate ./py38
if [[ "${{ github.ref }}" == "refs/heads/arcalive" ]]; then
pyinstaller --windowed --onefile --clean --icon="icon.ico" --add-data="icon.png;." --add-data="image.ico;." --name="아카라이브새글알리미-${{ github.ref_name }}.exe" main.py
else
pyinstaller --windowed --onefile --clean --icon="icon.ico" --add-data="icon.png;." --add-data="image.ico;." --name="DC새글알리미-${{ github.ref_name }}.exe" main.py
fi
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: 알리미
path: |
dist/*.exe
README.md
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download built artifact
uses: actions/download-artifact@v3
with:
name: 알리미
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
artifacts: |
*.exe
README.md
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
name: Release ${{ github.ref }}
body: "Auto-generated release"
draft: false
prerelease: false