Skip to content

Release

Release #16

Workflow file for this run

name: Release
on:
workflow_dispatch:
push:
tags:
- "*"
pull_request:
branches:
- main
jobs:
build-and-publish-binaries:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up python and poetry environment using custom action
uses: ./.github/actions/python-poetry-env
- name: Build wheels
run: poetry build --no-interaction --verbose
- name: Build binaries using pyinstaller
run: |
poetry run pyinstaller --clean --noconfirm --onefile git_archiver/github_archiver.py &&
poetry run pyinstaller --clean --noconfirm --onefile git_archiver/gitlab_archiver.py
- name: Create archive containing binary (unix)
run: zip -j dist/git_archiver-${{ runner.os }}.zip dist/*_archiver # -j: store just the name of a saved file (junk the path), and do not store directory names
if: runner.os != 'Windows'
- name: Create archive containing binary (windows)
run: Compress-Archive -Path "dist/*_archiver.exe" -DestinationPath "dist/git_archiver-${{ runner.os }}.zip"
if: runner.os == 'Windows'
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
dist/git_archiver-${{ runner.os }}.zip
if: |
startsWith(github.ref, 'refs/tags/')