Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak publishing workflow. #300

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/*
Loading