Skip to content

Commit

Permalink
Release 0.2.0 (#118)
Browse files Browse the repository at this point in the history
* bump version string

* add build script

* add node-version file for nvm

* reverted to the Ubuntu 22.04 support version

* action to build artifacts

* add step to install poetry

* added meteor to PATH

* ensure meteor PATH in build

* add release job
  • Loading branch information
xeluior committed Apr 20, 2024
1 parent 398453a commit 851483d
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 2 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Build

on:
push:

jobs:
build:
runs-on: ubuntu-22.04

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: 'meteor-dev/.node-version'

- name: Install poetry
run: pipx install poetry

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version-file: '.python-version'
cache: 'poetry'

- name: Setup Meteor
run: |
npm install -g meteor
export PATH="${HOME}/.meteor:${PATH}"
- name: Build Genisys
run: ./build.sh

- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: genisys-0.2.0.tar.gz
path: dist/genisys-0.2.0.tar.gz

- name: Upload wheel
uses: actions/upload-artifact@v4
with:
name: genisys-0.2.0-py3-none-any.whl
path: dist/genisys-0.2.0-py3-none-any.whl

- name: Upload Meteor tarball
uses: actions/upload-artifact@v4
with:
name: meteor-dev.tar.gz
path: genisys/server/external/meteor-dev.tar.gz

release:
runs-on: ubuntu-22.04
needs: [ build ]
if: github.event_name == 'push' && github.ref_type == 'tag'

steps:
- name: Download Artifacts
uses: actions/download-artifact@v4

- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
genisys-0.2.0-py3-none-any.whl/*.whl
genisys-0.2.0.tar.gz/*.tar.gz
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.10.13
3.10.12
24 changes: 24 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -e

type poetry &>/dev/null || (printf 'poetry is not installed' && exit 1)

if ! type meteor &>/dev/null; then
if [[ -d "${HOME}/.meteor" ]]; then
export PATH="${HOME}/.meteor:${PATH}"
else
printf 'meteor is not installed'
exit 1
fi
fi

if type nvm &>/dev/null; then
nvm use 14
fi

cd -- 'meteor-dev/'
meteor npm install
meteor build '../genisys/server/external'

cd -- '..'
poetry build
1 change: 1 addition & 0 deletions meteor-dev/.node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v14.21.3
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
[tool.poetry]
name = "genisys"
license = "BSD"
version = "0.1.0"
version = "0.2.0"
description = "Automatically install and configure machines over PXE"
authors = [
"Robert Gingras <gingrm02@pfw.edu>",
Expand Down

0 comments on commit 851483d

Please sign in to comment.