Create release #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create release | |
on: | |
push: | |
tags: | |
- v* | |
permissions: | |
contents: write | |
jobs: | |
build_linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 | |
pip install -r Face_Landmarker/requirements.txt | |
pyinstaller Face_Landmarker/Face_Landmarker_Link.spec | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build_artifact_linux | |
path: | | |
dist/Face_Landmarker_Link | |
build_windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 | |
pip install -r Face_Landmarker/requirements.txt | |
pyinstaller Face_Landmarker/Face_Landmarker_Link.spec | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build_artifact_windows | |
path: | | |
dist/Face_Landmarker_Link | |
build_macos: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 | |
pip install -r Face_Landmarker/requirements.txt | |
pyinstaller Face_Landmarker/Face_Landmarker_Link.spec | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build_artifact_macos | |
path: | | |
dist/Face_Landmarker_Link | |
release: | |
name: Release pushed tag | |
runs-on: ubuntu-22.04 | |
needs: [ build_linux, build_macos, build_windows ] | |
steps: | |
- name: Create release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ github.ref_name }} | |
run: | | |
gh release create "$tag" \ | |
--repo="$GITHUB_REPOSITORY" \ | |
--title="${GITHUB_REPOSITORY#*/} ${tag#v}" \ | |
--generate-notes | |
# - name: Create Release | |
# id: create_release | |
# uses: actions/create-release@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# tag_name: ${{ github.ref }} | |
# release_name: Release ${{ github.ref }} | |
# body: | | |
# Changes in this release: | |
# - Add your release notes here | |
- name: Download Windows artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: build_artifact_windows | |
- name: Download Linux artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: build_artifact_linux | |
- name: Download MacOS artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: build_artifact_macos | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
./build_artifact_linux.zip | |
./build_artifact_windows.zip | |
./build_artifact_macos.zip | |