Skip to content

NEURON Release

NEURON Release #20

Workflow file for this run

name: NEURON Release
on:
workflow_dispatch:
inputs:
rel_branch:
description: 'Release branch/commit'
default: 'release/x.y'
required: true
rel_tag:
description: 'Release version (tag name)'
default: 'x.y.z'
required: true
env:
GH_REPO: ${{ github.server_url }}/${{ github.repository }}
REL_TAG: ${{ github.event.inputs.rel_tag }}
REL_BRANCH: ${{ github.event.inputs.rel_branch }}
jobs:
tag-n-release:
runs-on: ubuntu-latest
name: tag-n-release ${{ github.event.inputs.rel_tag }} (${{ github.event.inputs.rel_branch }})
outputs:
release_url: ${{ steps.create_release.outputs.upload_url }}
rel_tag: ${{ env.REL_TAG }}
steps:
- uses: actions/checkout@v4
name: Checkout branch ${{ env.REL_BRANCH }}
with:
ref: ${{ env.REL_BRANCH }}
- name: Create and upload tag ${{ env.REL_TAG }}
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git tag -a $REL_TAG -m "${REL_TAG}"
git push origin $REL_TAG
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: ${{runner.workspace}}/nrn
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: ${{ env.REL_TAG }}
name: Release ${{ env.REL_TAG }}
prerelease: true
nrn-full-src-package:
runs-on: ubuntu-latest
needs: tag-n-release
steps:
- name: Checkout feature-rich code
run: |
git clone --depth=1 --shallow-submodules --recurse-submodules $GH_REPO -b $REL_TAG --single-branch
cd nrn
LOCAL_TAG=`git tag`
if [ $REL_TAG != $LOCAL_TAG ]; then
echo "Wrong tag downloaded!"
exit 1
else
git log --oneline
fi
- name: Make nrnversion.h
run: |
mkdir build && cd build
cmake -DNRN_ENABLE_PYTHON=OFF -DNRN_ENABLE_RX3D=OFF -DNRN_ENABLE_MPI=OFF -DNRN_ENABLE_INTERVIEWS=OFF ../nrn
make nrnversion_h VERBOSE=1
- name: Create nrn-full-src-package
id: tar
run: |
tar -czvf nrn-full-src-package-${REL_TAG}.tar.gz nrn
echo "asset_file=nrn-full-src-package-${REL_TAG}.tar.gz" >> $GITHUB_OUTPUT
- name: Upload nrn-full-src-package to release
run: |
gh release upload ${{ needs.tag-n-release.outputs.rel_tag }} ${{ steps.tar.outputs.asset_file }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
windows-installer:
needs: tag-n-release
uses: neuronsimulator/nrn/.github/workflows/windows.yml@master
with:
tag: ${{ needs.tag-n-release.outputs.rel_tag }}