Skip to content

Commit

Permalink
Update ci (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
jziolkowski authored Sep 21, 2024
1 parent 535633b commit db64437
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 75 deletions.
146 changes: 73 additions & 73 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,86 +1,86 @@
name: GitHub release

on:
workflow_dispatch:
push:
branches:
- master
- develop
paths-ignore:
- '.github/**'
- '**.md'
workflow_dispatch:
push:
branches:
- master
- develop
paths-ignore:
- '.github/**'
- '**.md'

jobs:
Binaries:
runs-on: ${{ matrix.os }}
outputs:
version-tag: ${{ steps.version_tag.outputs.VERSION_TAG }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-2019
arch: x86
- os: windows-2019
arch: x64
- os: macos-13
arch: x64
Binaries:
runs-on: ${{ matrix.os }}
outputs:
version-tag: ${{ steps.version_tag.outputs.VERSION_TAG }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-2019
arch: x86
- os: windows-2019
arch: x64
- os: macos-13
arch: x64

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: '3.8'
architecture: ${{ matrix.arch }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: '3.8'
architecture: ${{ matrix.arch }}

- name: Install PyInstaller
run: pip install -r requirements_build.txt
- name: Install PyInstaller
run: pip install -r requirements_build.txt

- name: Retrieve version tag
id: version_tag
shell: bash
run: echo "VERSION_TAG=$(python -m setuptools_scm)" >> $GITHUB_OUTPUT
- name: Retrieve version tag
id: version_tag
shell: bash
run: echo "VERSION_TAG=$(python -m setuptools_scm)" >> $GITHUB_OUTPUT

- name: Build with PyInstaller
run: pyinstaller --noconfirm --clean tdmgr.spec
- name: Build with PyInstaller
run: pyinstaller --noconfirm --clean tdmgr.spec

- name: Create .dmg
if: matrix.os == 'macos-13'
shell: bash
run: |
brew install create-dmg
newfile=$(basename dist/*.app .app).dmg
create-dmg $newfile dist
rm dist/*.app
mv /Users/runner/work/tdm/tdm/*.dmg dist
- name: Create .dmg
if: matrix.os == 'macos-13'
shell: bash
run: |
brew install create-dmg
newfile=$(basename dist/*.app .app).dmg
create-dmg $newfile dist
rm dist/*.app
mv /Users/runner/work/tdm/tdm/*.dmg dist
- name: Upload binaries artifact to workflow
uses: actions/upload-artifact@v3
with:
name: tdmgr
path: dist/*
- name: Upload binaries artifact to workflow
uses: actions/upload-artifact@v3
with:
name: tdmgr
path: dist/*

Draft-Release:
runs-on: ubuntu-latest
needs: Binaries
env:
VERSION_TAG: ${{ needs.Binaries.outputs.version-tag }}
steps:
- name: Download artifacts from build
uses: actions/download-artifact@v3
Draft-Release:
runs-on: ubuntu-latest
needs: Binaries
env:
VERSION_TAG: ${{ needs.Binaries.outputs.version-tag }}
steps:
- name: Download artifacts from build
uses: actions/download-artifact@v3

- name: Create Draft Release
id: create_release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION_TAG }}
name: TDM ${{ env.VERSION_TAG }}
draft: true
prerelease: ${{ github.ref_name == 'refs/heads/develop'}}
generate_release_notes: true
files: tdmgr/*
- name: Create Draft Release
id: create_release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref == 'refs/heads/develop' && 'pre' || '' }}${{ env.VERSION_TAG }}
name: TDM ${{ env.VERSION_TAG }}
draft: true
prerelease: ${{ github.ref_name == 'refs/heads/develop'}}
generate_release_notes: true
files: tdmgr/*
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=64", "setuptools-scm>=8"]
requires = ["setuptools>=64", "setuptools-scm[toml]>=8"]
build-backend = "setuptools.build_meta"

[project]
Expand Down
2 changes: 1 addition & 1 deletion requirements_build.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-r requirements.txt
pyinstaller>=4
setuptools>=64
setuptools-scm>=8
setuptools-scm[toml]>=8

0 comments on commit db64437

Please sign in to comment.