Skip to content

Commit

Permalink
Change artifact name if schedule event. If two branches are run, the …
Browse files Browse the repository at this point in the history
…artifact names must be distinct.
  • Loading branch information
mrclary committed Nov 5, 2024
1 parent 47389cc commit 7b33f66
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/installers-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ jobs:
needs:
- build-matrix
strategy:
fail-fast: false
matrix:
branch: ${{ fromJson(needs.build-matrix.outputs.branch) }}
uses: ./.github/workflows/build-subrepos.yml
Expand Down Expand Up @@ -143,6 +144,7 @@ jobs:
MACOS_INSTALLER_CERTIFICATE: ${{ secrets.MACOS_INSTALLER_CERTIFICATE }}
APPLICATION_PWD: ${{ secrets.APPLICATION_PWD }}
CONSTRUCTOR_TARGET_PLATFORM: ${{ matrix.target-platform }}
MATRIX_BRANCH: ${{ matrix.branch }}

steps:
- name: Checkout Code
Expand Down Expand Up @@ -290,11 +292,15 @@ jobs:
python build_installers.py ${args[@]}
SPYVER=$(python build_installers.py --version)
PKG_NAME=$(ls $DISTDIR | grep Spyder-)
PKG_PATH=$(python build_installers.py --artifact-name)
PKG_NAME=$(basename $PKG_PATH)
ARTIFACT_NAME=${PKG_NAME%.*}
[[ "$GITHUB_EVENT_NAME" == "schedule" ]] && ARTIFACT_NAME=$ARTIFACT_NAME-$MATRIX_BRANCH
echo "SPYVER=$SPYVER" >> $GITHUB_ENV
echo "PKG_NAME=$PKG_NAME" >> $GITHUB_ENV
echo "ARTIFACT_NAME=${PKG_NAME%.*}" >> $GITHUB_ENV
echo "PKG_PATH=$DISTDIR/$PKG_NAME" >> $GITHUB_ENV
echo "ARTIFACT_NAME=$ARTIFACT_NAME" >> $GITHUB_ENV
echo "PKG_PATH=$PKG_PATH" >> $GITHUB_ENV
- name: Test macOS or Linux Installer
if: runner.os != 'Windows'
Expand Down

0 comments on commit 7b33f66

Please sign in to comment.