Skip to content

Commit

Permalink
When doing a release build, copy files to the aptly named folder on R2
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelherger committed Nov 22, 2024
1 parent d895809 commit d887c3a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/actions/build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ runs:
run: |
MAJOR=$(grep "\$VERSION" server/slimserver.pl | head -n1 | cut -d"'" -f2 | cut -d. -f1)
MINOR=$(grep "\$VERSION" server/slimserver.pl | head -n1 | cut -d"'" -f2 | cut -d. -f2)
PATCH=$(grep "\$VERSION" server/slimserver.pl | head -n1 | cut -d"'" -f2 | cut -d. -f3)
echo "LMS_VERSION=$MAJOR.$MINOR" >> $GITHUB_OUTPUT
echo "LMS_FULL_VERSION=$MAJOR.$MINOR.$PATCH" >> $GITHUB_OUTPUT
echo "GIT_BRANCH=public/$MAJOR.$MINOR" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -113,9 +115,15 @@ runs:
echo "aws_access_key_id=${{ inputs.AWS_KEY_ID }}" >> $HOME/.aws/credentials
echo "aws_secret_access_key=${{ inputs.AWS_SECRET_ACCESS_KEY }}" >> $HOME/.aws/credentials
TARGET_FOLDER="${{ inputs.build-type }}"
if [ "${{ inputs.build-type }}" = "release" ]; then
TARGET_FOLDER="LyrionMusicServer_v${{ steps.getversion.outputs.LMS_FULL_VERSION }}"
fi
for f in publish/?yrion?usic?erver*;
do
aws --profile downloads --endpoint-url https://e83bc03c881257fada7ca16c243e9298.eu.r2.cloudflarestorage.com s3 cp $f s3://downloads/${{ inputs.build-type }}/
aws --profile downloads --endpoint-url https://e83bc03c881257fada7ca16c243e9298.eu.r2.cloudflarestorage.com s3 cp $f s3://downloads/$TARGET_FOLDER/
done
rm -f $HOME/.aws/credentials
Expand Down

0 comments on commit d887c3a

Please sign in to comment.