Skip to content

Commit

Permalink
Update publish action.
Browse files Browse the repository at this point in the history
  • Loading branch information
trisyoungs committed Jan 14, 2025
1 parent 2c21e8d commit 4c8d253
Showing 1 changed file with 25 additions and 22 deletions.
47 changes: 25 additions & 22 deletions .github/workflows/publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@ inputs:
- continuous
- release
- legacy
description: "Publishing type"
releaseTag:
type: string
description: "Existing tag which the release will be associated to on GitHub"
releaseName:
type: string
description: "Name of the release as it will appear on GitHub"
releaseBody:
type: string
description: "Body text of the release as it will appear on GitHub"
releaseBodyFile:
type: string
default: ''
description: "Body file to use for body text, used in preference to releaseBody if provided"

runs:
using: "composite"
Expand All @@ -27,35 +41,24 @@ runs:
merge-multiple: true
path: ${{ github.workspace }}/packages

- name: Download Prerequisites
shell: bash
run: |
wget https://raw.githubusercontent.com/disorderedmaterials/scripts/master/update-release
chmod u+x ./update-release
- name: Package Examples
shell: bash
run: |
set -ex
cd ./examples
./package-examples -v ${{ env.dissolveVersion }}
- name: Publish on GitHub (Release)
if: ${{ inputs.publishType == 'release' }}
shell: bash
run: |
echo "Release tag/name will be: ${{ env.dissolveVersion }}"
export GITHUB_TOKEN=${{ github.token }}
./update-release -r disorderedmaterials/dissolve -t ${{ env.dissolveVersion }} -n "${{ env.dissolveVersion }}" -f ReleaseNotes.md packages/* examples/*.zip examples/*.tar.gz
- name: Publish on GitHub (Continuous)
if: ${{ inputs.publishType == 'continuous' }}
shell: bash
run: |
echo "Release tag will be: continuous"
echo "Release name will be: 'Continuous (${{ env.dissolveVersion }} @ ${{ env.dissolveShortHash }})'"
export GITHUB_TOKEN=${{ github.token }}
./update-release -r disorderedmaterials/dissolve -t continuous -p -e -u -n "Continuous (${{ env.dissolveVersion }} @ ${{ env.dissolveShortHash }})" -b "Continuous release from \`develop\` branch @ ${{ env.dissolveShortHash }}. Built $(date)." packages/*
- name: Publish on GitHub
if: ${{ inputs.publishType == 'release' || inputs.publishType == 'continuous' }}
uses: "./.github/workflows/create-release"
with:
releaseTag: ${{ inputs.releaseTag }}
releaseName: ${{ inputs.releaseName }}
releaseBody: ${{ inputs.releaseBody }}
releaseBodyFile: ${{ inputs.releaseBodyFile }}
releaseAssetsDirectory: "${{ github.workspace }}/packages"
updateRelease: ${{ inputs.publishType == 'continuous' }}
isPreRelease: ${{ inputs.publishType == 'continuous' }}

- name: Publish on Harbor
if: ${{ inputs.publishType != 'none' }}
Expand Down

0 comments on commit 4c8d253

Please sign in to comment.