Skip to content

rebuild

rebuild #46

Workflow file for this run

---
name: Release
on:
pull_request:
types:
- closed
branches:
- main
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.10"]
steps:
- name: Check out code into the directory
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Use pyinstall to create router_registration_bootstrap distribution binary
run: wget https://raw.githubusercontent.com/netfoundry/ziti_router_auto_enroll/main/ziti_router_auto_enroll.py; pyinstaller -F router_registration_bootstrap.py --runtime-tmpdir /opt/netfoundry/
- name: Use pyinstall to create router_registration distribution binary
run: mkdir /opt/netfoundry; pyinstaller -F router_registration.py --runtime-tmpdir /opt/netfoundry/
- name: version
run: echo "version=$(./dist/router_registration -v)" >> $GITHUB_ENV
id: version
- name: Tar bootstrap
# tar with a dash in the name for backwards compatibility
run: cd dist; mv router_registration_bootstrap router-registration; tar -zcvf router_registration_bootstrap.tar.gz router-registration
- name: Tar router registration
# tar with a . in the name for backwards compatibility
run: cd dist; mv router_registration .router_registration; tar -zcvf router_registration.tar.gz .router_registration
- name: release
uses: ncipollo/release-action@v1
id: release
with:
draft: false
prerelease: false
tag: v${{ env.version }}
artifacts: "dist/router_registration_bootstrap.tar.gz,dist/router_registration.tar.gz"
artifactContentType: application/gzip
env:
GITHUB_TOKEN: ${{ github.token }}