Skip to content

bump version to 24.9.0.604 #156

bump version to 24.9.0.604

bump version to 24.9.0.604 #156

Workflow file for this run

name: Release
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
strategy:
fail-fast: false
matrix:
build: [
cl_x64_release,
cl_x86_release,
cl_ARM64_release,
]
include:
- { build: cl_x64_release, arch: amd64, platform: x64, }
- { build: cl_x86_release, arch: amd64_x86, platform: x86, }
- { build: cl_ARM64_release, arch: amd64_arm64, platform: ARM64, }
env:
BUILD_TYPE: RelWithDebInfo
runs-on: windows-2022
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Get version
shell: bash
run: |
export VERSION_MAJOR=$(grep "NETBOX_VERSION_MAJOR" src/NetBox/plugin_version.hpp | sed -e "s/^.* NETBOX_VERSION_MAJOR\s*\([0-9]\+\)/\1/g")
export VERSION_MINOR=$(grep "NETBOX_VERSION_MINOR" src/NetBox/plugin_version.hpp | sed -e "s/^.* NETBOX_VERSION_MINOR\s*\([0-9]\+\)/\1/g")
export VERSION_PATCH=$(grep "NETBOX_VERSION_PATCH" src/NetBox/plugin_version.hpp | sed -e "s/^.* NETBOX_VERSION_PATCH\s*\([0-9]\+\)/\1/g")
export VERSION_BUILD=$(grep "NETBOX_VERSION_BUILD" src/NetBox/plugin_version.hpp | sed -e "s/^.* NETBOX_VERSION_BUILD\s*\([0-9]\+\)/\1/g")
echo "VERSION=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH.$VERSION_BUILD.$GITHUB_RUN_NUMBER">> $GITHUB_ENV
- name: Set the pack file name
shell: bash
run: |
echo "netbox_name=NetBox.${{ matrix.platform }}.${{ env.version }}.7z" >> $GITHUB_ENV
echo "netbox_pdb_name=NetBox.${{ matrix.platform }}.${{ env.version }}.pdb.7z" >> $GITHUB_ENV
- name: Add C++ build tools to PATH
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- name: Create Build folder
run: cmake -E make_directory build
- name: Configure CMake
shell: bash
working-directory: build
run: >
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPROJECT_PLATFORM=${{ matrix.platform }} -DOPT_CREATE_PLUGIN_DIR=ON $GITHUB_WORKSPACE
- name: Build
working-directory: build
shell: bash
run: cmake --build . --config $BUILD_TYPE --target all
- name: Pack plugin
shell: bash
run: |
7z a -m0=LZMA -mf=BCJ2 -mx9 ${{ env.netbox_name }} ./Far3_${{ matrix.platform }}/Plugins/* -xr!*.pdb
if [[ -f ./Far3_${{ matrix.platform }}/Plugins/NetBox/NetBox.pdb ]] ; then
7z a -m0=LZMA -mf=off -mx9 ${{ env.netbox_pdb_name }} ./Far3_${{ matrix.platform }}/Plugins/NetBox/NetBox.pdb
fi
- name: Upload result
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: FarNetBox.${{ matrix.platform }}
path: ./*.7z
overwrite: true
retention-days: 2
create-release:
needs: [build]
runs-on: windows-2022
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Get plugin version
shell: bash
run: |
export VERSION_MAJOR=$(grep "NETBOX_VERSION_MAJOR" src/NetBox/plugin_version.hpp | sed -e "s/^.* NETBOX_VERSION_MAJOR\s*\([0-9]\+\)/\1/g")
export VERSION_MINOR=$(grep "NETBOX_VERSION_MINOR" src/NetBox/plugin_version.hpp | sed -e "s/^.* NETBOX_VERSION_MINOR\s*\([0-9]\+\)/\1/g")
export VERSION_PATCH=$(grep "NETBOX_VERSION_PATCH" src/NetBox/plugin_version.hpp | sed -e "s/^.* NETBOX_VERSION_PATCH\s*\([0-9]\+\)/\1/g")
export VERSION_BUILD=$(grep "NETBOX_VERSION_BUILD" src/NetBox/plugin_version.hpp | sed -e "s/^.* NETBOX_VERSION_BUILD\s*\([0-9]\+\)/\1/g")
echo "VERSION_SHORT=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH.$VERSION_BUILD">> $GITHUB_ENV
echo "VERSION=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH.$VERSION_BUILD.$GITHUB_RUN_NUMBER">> $GITHUB_ENV
- name: Download archives
uses: actions/download-artifact@v4
with:
pattern: FarNetBox.*
path: FarNetBox/
merge-multiple: true
- name: Display structure of downloaded files
run: ls -R FarNetBox/
- name: Create release
shell: bash
run: |
gh release create v${{ env.version }} --draft --generate-notes --title "NetBox ${{ env.version_short }}" FarNetBox/*.7z
env:
# GITHUB_TOKEN: ${{ secrets.NETBOX_GITHUB_TOKEN }}
GH_TOKEN: ${{ github.token }}