diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7b4b1fb..ca1cbb2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,7 @@ name: Build and release on: push: tags: - - "v*" + - "v*.*.*" workflow_dispatch: jobs: @@ -16,6 +16,47 @@ jobs: - name: Checkout code uses: actions/checkout@v2 + - name: Get the latest tag and date + id: version_info + run: | + echo "tag=$(echo $GITHUB_REF | sed 's/refs\/tags\///')" >> $GITHUB_ENV + echo "date=$(date +"(%d-%m-%Y)")" >> $GITHUB_ENV + + - name: Check if WallGoMatrixVersion matches GitHub tag + run: | + WallGoMatrixVersion=$(sed -n 's/WallGoMatrix`\$WallGoMatrixVersion = "\(.*\)";/\1/p' WallGoMatrix.m) + WallGoMatrixVersionDate=$(sed -n 's/WallGoMatrix`\$WallGoMatrixVersionDate = "\(.*\)";/\1/p' WallGoMatrix.m) + + if [ "$WallGoMatrixVersion" == "${{ env.tag }}" ]; then + echo "WallGoMatrixVersion matches the tag" + else + echo "Error: WallGoMatrixVersion ($WallGoMatrixVersion) does not match tag (${{ env.tag }})" 1>&2 + exit 64 + fi + + if [ "$WallGoMatrixVersionDate" == "${{ env.date }}" ]; then + echo "WallGoMatrixVersionDate matches the date" + else + echo "Error: WallGoMatrix date $WallGoMatrixVersionDate does not match date ${{ env.date }}" 1>&2 + exit 64 + fi + + # - name: Update version and date in WallGoMatrix.m + # run: | + # sed -i.bak \ + # -e "s/WallGoMatrix\`\$WallGoMatrixVersion = \".*\";/WallGoMatrix\`\$WallGoMatrixVersion = \"${{ env.tag }}\"\;/" \ + # -e "s/WallGoMatrix\`\$WallGoMatrixVersionDate = \".*\"\;/WallGoMatrix\`\$WallGoMatrixVersionDate = \"${{ env.date }}\"\;/" \ + # WallGoMatrix.m + + # - name: Commit and push version update + # run: | + # git config --global user.name 'github-actions' + # git config --global user.email 'github-actions@github.com' + # rm WallGoMatrix.m.bak + # git add WallGoMatrix.m + # git commit -m "Update WallGoMatrix version to ${{ env.tag }} and date to ${{ env.date }}" + # git push origin HEAD + - name: Create Release id: create_release uses: actions/create-release@v1 @@ -46,4 +87,4 @@ jobs: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./WallGoMatrix_${{ github.ref_name }}.zip asset_name: WallGoMatrix_${{ github.ref_name }}.zip - asset_content_type: application/zip + asset_content_type: application/zip \ No newline at end of file diff --git a/WallGoMatrix.m b/WallGoMatrix.m index 727dbc2..ed4998a 100644 --- a/WallGoMatrix.m +++ b/WallGoMatrix.m @@ -2,21 +2,22 @@ (* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ *) -(* :Title: WallGoMatrix *) +(* :Title: WallGoMatrix *) (* - This software is covered by the GNU General Public License 3. - Copyright (C) 2024-2024 Andreas Ekstedt - Copyright (C) 2024-2024 Oliver Gould - Copyright (C) 2024-2024 Joonas Hirvonen - Copyright (C) 2024-2024 Benoit Laurent - Copyright (C) 2024-2024 Lauri Niemi - Copyright (C) 2024-2024 Philipp Schicho - Copyright (C) 2024-2024 Jorinde van de Vis + This software is covered by the GNU General Public License 3. + Copyright (C) 2024-2024 Andreas Ekstedt + Copyright (C) 2024-2024 Oliver Gould + Copyright (C) 2024-2024 Joonas Hirvonen + Copyright (C) 2024-2024 Benoit Laurent + Copyright (C) 2024-2024 Lauri Niemi + Copyright (C) 2024-2024 Philipp Schicho + Copyright (C) 2024-2024 Jorinde van de Vis *) (* :Summary: WallgoMatirx is an algorithm that constructs - the Matrix Elements at Leading Log and partially NLL for generic models. *) + the Matrix Elements at Leading Log and partially NLL for generic models. +*) (* ------------------------------------------------------------------------ *) @@ -32,7 +33,7 @@ (* Set the version number *) -WallGoMatrix`$WallGoMatrixVersion = "0.1.1"; +WallGoMatrix`$WallGoMatrixVersion = "v0.1.1"; WallGoMatrix`$WallGoMatrixVersionDate = "(09-10-2024)"; WallGoMatrix`$WallGoMatrixRequiredVersion = 13.0; diff --git a/examples/qcd.m b/examples/qcd.m index 94eb4cf..06f0bb3 100644 --- a/examples/qcd.m +++ b/examples/qcd.m @@ -107,7 +107,3 @@ ParticleName, ParticleMasses, {TruncateAtLeadingLog->True,Format->{"json","txt"}}]; - - - -