Skip to content

prep release

prep release #24

Workflow file for this run

name: Package
on:
push:
tags:
- 'v*'
jobs:
ubuntu-jammy:
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- extension_support: 0
variant_tag: "-noext"
- extension_support: 1
variant_tag: ""
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Get version tag
id: get_version
uses: battila7/get-version-action@v2
- name: Ubuntu dependencies
run: |
sudo apt update
sudo apt-get install -y software-properties-common \
build-essential \
python3-dev python3-pip python3.11-venv \
pkg-config libssl-dev libdbus-1-dev libdbus-glib-1-dev libffi-dev libkrb5-dev
- name: Build the executable
run: |
python3 -m venv venv
source venv/bin/activate
pip install ./sign_client
pip install external/okta-0.0.3.1-py2.py3-none-any.whl
pip install -e .
pip install -e .[test]
pip install -e .[setup]
make
env:
UST_EXTENSION: ${{matrix.extension_support}}
- name: Get build
run: |
cd dist
tar czf "user-sync-${UST_VERSION}${UST_VARIANT_TAG}-ubuntu_jammy.tar.gz" user-sync
env:
UST_VARIANT_TAG: ${{matrix.variant_tag}}
UST_VERSION: ${{ steps.get_version.outputs.version }}
- name: Make artifacts
uses: actions/upload-artifact@v2
with:
name: ubuntu-jammy
path: dist/*.tar.gz
retention-days: 30
ubuntu-focal:
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- extension_support: 0
variant_tag: "-noext"
- extension_support: 1
variant_tag: ""
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Get version tag
id: get_version
uses: battila7/get-version-action@v2
- name: Ubuntu-Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo apt-get install -y build-essential
sudo apt-get install -y python3-dev python3-pip python3-virtualenv
sudo apt-get install -y pkg-config libssl-dev libdbus-1-dev libdbus-glib-1-dev python-dbus libffi-dev libkrb5-dev
- run: |
pip install ./sign_client
pip install external/okta-0.0.3.1-py2.py3-none-any.whl
pip install -e .
pip install -e .[test]
pip install -e .[setup]
- name: Build executable
run: make
env:
UST_EXTENSION: ${{matrix.extension_support}}
- name: Get build
run: |
cd dist
tar czf "user-sync-${UST_VERSION}${UST_VARIANT_TAG}-ubuntu_focal.tar.gz" user-sync
env:
UST_VARIANT_TAG: ${{matrix.variant_tag}}
UST_VERSION: ${{ steps.get_version.outputs.version }}
- name: Make artifacts
uses: actions/upload-artifact@v2
with:
name: ubuntu-focal
path: dist/*.tar.gz
retention-days: 30
windows:
runs-on: windows-latest
strategy:
matrix:
include:
- extension_support: 0
variant_tag: "-noext"
- extension_support: 1
variant_tag: ""
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Get version tag
id: get_version
uses: battila7/get-version-action@v2
- run: |
pip install ./sign_client
pip install external/okta-0.0.3.1-py2.py3-none-any.whl
pip install -e .
pip install -e .[test]
pip install -e .[setup]
- run: make standalone
env:
UST_EXTENSION: ${{matrix.extension_support}}
- name: Get build
run: |
cd dist
7z a user-sync-${{ steps.get_version.outputs.version }}${{matrix.variant_tag}}-win64.zip user-sync.exe
- name: Make artifact
uses: actions/upload-artifact@v2
with:
name: windows
path: dist/*.zip
retention-days: 30
centos:
runs-on: ubuntu-latest
env:
LC_ALL: en_US.utf8
LANG: en_US.utf8
container:
image: centos:7
strategy:
matrix:
include:
- extension_support: 0
variant_tag: "-noext"
- extension_support: 1
variant_tag: ""
steps:
- uses: actions/checkout@v2
- name: Get version tag
id: get_version
uses: battila7/get-version-action@v2
- name: Centos-Install dependencies
run: |
yum install -y pkgconfig gcc openssl-devel dbus-glib-devel dbus-python sqlite-devel libffi-devel wget make
mkdir tmp && cd tmp
wget https://www.python.org/ftp/python/3.9.7/Python-3.9.7.tgz
tar xzf Python-3.9.7.tgz
cd Python-3.9.7
./configure --enable-optimizations --enable-shared --enable-loadable-sqlite-extensions
make altinstall
cd ../..
- name: Build executable
run: |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/
/usr/local/bin/python3.9 -m venv venv
source venv/bin/activate
# for some reason, pycryptodome won't install when
# setuptools is installed/upgraded, so install it before
# install/upgrade setuptools
pip install pycryptodome==3.9.7
python -m pip install --upgrade pip pyinstaller setuptools
pip install ./sign_client
pip install external/okta-0.0.3.1-py2.py3-none-any.whl
pip install -e .
pip install -e .[test]
pip install -e .[setup]
make
deactivate
env:
UST_EXTENSION: ${{matrix.extension_support}}
- name: Get build
run: |
cd dist
tar czf "user-sync-${UST_VERSION}${UST_VARIANT_TAG}-centos.tar.gz" user-sync
env:
UST_VARIANT_TAG: ${{matrix.variant_tag}}
UST_VERSION: ${{ steps.get_version.outputs.version }}
- name: Make artifact
uses: actions/upload-artifact@v2
with:
name: centos
path: dist/*.tar.gz
retention-days: 30
examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: user-sync-examples-zip
run: |
cd examples
zip -r user-sync-examples.zip .
- uses: actions/upload-artifact@v2
with:
name: examples
path: examples/*.zip
retention-days: 30
- name: user-sync.tar.gz
run: |
tar -czvf "user-sync-examples.tar.gz" examples
- uses: actions/upload-artifact@v2
with:
name: examples
path: user-sync-examples.tar.gz
retention-days: 30
release:
runs-on: ubuntu-latest
needs: [centos, ubuntu-jammy, ubuntu-focal, examples, windows]
steps:
- uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: User Sync Tool ${{ github.ref }}
body_path: .changelog/latest.md
draft: false
prerelease: false
upload-assets:
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
- name: Get version tag
id: get_version
uses: battila7/get-version-action@v2
- uses: AButler/[email protected]
with:
files: 'examples/*;ubuntu-jammy/*;ubuntu-focal/*;centos/*'
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ steps.get_version.outputs.version }}