Skip to content

Commit

Permalink
Tweak publishing workflow. (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
trisyoungs committed Jan 22, 2024
1 parent be9728e commit 4f0eeec
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions .github/workflows/publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,23 @@ runs:
wget https://raw.githubusercontent.com/disorderedmaterials/scripts/master/update-release
chmod u+x ./update-release
- name: Publish on Harbor (Continuous)
if: ${{ inputs.publishHarbor == 'true' && inputs.isRelease == 'false' }}
- name: Publish on GitHub (Release)
if: ${{ inputs.publishGitHub == 'true' && inputs.isRelease == 'true' }}
shell: bash
run: |
echo "Release tag will be: ${{ env.jv2Version }}"
echo "Release name will be: ${{ env.jv2Version }}"
export GITHUB_TOKEN=${{ github.token }}
./update-release -r disorderedmaterials/jv2 -t ${{ env.jv2Version }} -n "${{ env.jv2Version }}" -f ReleaseNotes.md packages/*
- name: Publish on GitHub (Continuous)
if: ${{ inputs.publishGitHub == 'true' && inputs.isRelease == 'false' }}
shell: bash
run: |
echo "Release tag will be: continuous"
apptainer remote login --username ${HARBOR_USER} --password ${HARBOR_SECRET} docker://harbor.stfc.ac.uk
${SINGULARITY_ROOT}/bin/apptainer push packages/jv2-${{ env.jv2Version }}.sif oras://harbor.stfc.ac.uk/isis_disordered_materials/jv2:continuous
echo "Release name will be: 'Continuous (${{ env.jv2Version }})'"
export GITHUB_TOKEN=${{ github.token }}
./update-release -r disorderedmaterials/jv2 -t continuous -p -e -u -n "Continuous (${{ env.jv2Version }})" -b "Continuous release from \`develop\` branch @ ${{ env.jv2ShortHash }}. Built $(date)." packages/*
- name: Publish on Harbor (Release)
if: ${{ inputs.publishHarbor == 'true' && inputs.isRelease == 'true' }}
Expand All @@ -49,20 +59,11 @@ runs:
apptainer remote login --username ${HARBOR_USER} --password ${HARBOR_SECRET} docker://harbor.stfc.ac.uk
${SINGULARITY_ROOT}/bin/apptainer push packages/jv2-${{ env.jv2Version }}.sif oras://harbor.stfc.ac.uk/isis_disordered_materials/jv2:latest
- name: Publish on GitHub (Continuous)
if: ${{ inputs.publishGitHub == 'true' && inputs.isRelease == 'false' }}
- name: Publish on Harbor (Continuous)
if: ${{ inputs.publishHarbor == 'true' && inputs.isRelease == 'false' }}
shell: bash
run: |
echo "Release tag will be: continuous"
echo "Release name will be: 'Continuous (${{ env.jv2Version }})'"
export GITHUB_TOKEN=${{ github.token }}
./update-release -r disorderedmaterials/jv2 -t continuous -n "Continuous (${{ env.jv2Version }})" -b "Continuous release from \`develop\` branch @ ${{ env.jv2ShortHash }}. Built $(date)." -e packages/*
apptainer remote login --username ${HARBOR_USER} --password ${HARBOR_SECRET} docker://harbor.stfc.ac.uk
${SINGULARITY_ROOT}/bin/apptainer push packages/jv2-${{ env.jv2Version }}.sif oras://harbor.stfc.ac.uk/isis_disordered_materials/jv2:continuous
- name: Publish on GitHub (Release)
if: ${{ inputs.publishGitHub == 'true' && inputs.isRelease == 'true' }}
shell: bash
run: |
echo "Release tag will be: ${{ env.jv2Version }}"
echo "Release name will be: ${{ env.jv2Version }}"
export GITHUB_TOKEN=${{ github.token }}
./update-release -r disorderedmaterials/jv2 -t ${{ env.jv2Version }} -n "${{ env.jv2Version }}" -f ReleaseNotes.md -e packages/*

0 comments on commit 4f0eeec

Please sign in to comment.