Changed extracting path of pyinstaller from /tmp to /opt/netfoundry #11
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Release | |
on: | |
pull_request: | |
types: | |
- closed | |
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 distribution binary | |
run: pyinstaller -F router_upgrade_bootstrap.py --runtime-tmpdir /opt/netfoundry/ | |
- name: Use pyinstall to create main binary | |
run: mkdir /opt/netfoundry; pyinstaller -F router_upgrade.py --runtime-tmpdir /opt/netfoundry/ | |
- name: version | |
run: echo "version=$(./dist/router_upgrade -v)" >> $GITHUB_ENV | |
id: version | |
- name: Tar bootstrap | |
# tar with previous distibuted name for backwards compatibility | |
run: cd dist; mv router_upgrade_bootstrap zt-upgrade; tar -zcvf router_upgrade_bootstrap.tar.gz zt-upgrade | |
- name: Tar main script | |
# tar with previous distibuted name for backwards compatibility | |
run: cd dist; mv router_upgrade .router_upgrade; tar -zcvf router_upgrade.tar.gz .router_upgrade | |
- name: release | |
uses: ncipollo/release-action@v1 | |
id: release | |
with: | |
draft: false | |
prerelease: false | |
tag: v${{ env.version }} | |
artifacts: "dist/router_upgrade_bootstrap.tar.gz,dist/router_upgrade.tar.gz" | |
artifactContentType: application/gzip | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |