Skip to content

Commit

Permalink
Update Build and Release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
yodaluca23 authored Jun 21, 2024
1 parent 6dfbb3a commit c03ccf7
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions .github/workflows/Build and Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,34 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up variables
id: setup
run: |
echo "EEVEEVERSION=${{ github.event.inputs.EEVEEVERSION }}" >> $GITHUB_ENV
echo "CHANGEVERSION=${{ github.event.inputs.CHANGEVERSION }}" >> $GITHUB_ENV
echo "SPOTURL=${{ github.event.inputs.SPOTURL }}" >> $GITHUB_ENV
- name: Install Pyzule
run: bash -c "$(curl https://raw.githubusercontent.com/asdfzxcvbn/pyzule/main/install-pyzule.sh)"

- name: Fetch EeveeSpotify release tags
id: get-eevee-tag

- name: Get EeveeSpotify release tags
id: get-tags
run: |
tags=$(curl -s https://api.github.com/repos/whoeevee/EeveeSpotify/tags | jq -r '.[].name')
echo "tags=$tags" >> $GITHUB_ENV
- name: Determine EeveeSpotify version
id: determine-version
run: |
EEVEEVERSION="${{ github.event.inputs.EEVEEVERSION }}"
if [ -z "$EEVEEVERSION" ]; then
REALEEVEEVERSION=$(curl -s https://api.github.com/repos/whoeevee/EeveeSpotify/releases/latest | jq -r .tag_name)
if [ -n "${{ env.EEVEEVERSION }}" ]; then
REALEEVEEVERSION=$(echo $tags | tr ' ' '\n' | grep "${{ env.EEVEEVERSION }}" | head -n 1)
if [ -z "$REALEEVEEVERSION" ]; then
echo "No matching tag found for EEVEEVERSION: ${{ env.EEVEEVERSION }}"
exit 1
fi
else
REALEEVEEVERSION=$(curl -s https://api.github.com/repos/whoeevee/EeveeSpotify/releases | jq -r ".[] | select(.tag_name | contains(\"$EEVEEVERSION\")).tag_name")
REALEEVEEVERSION=$(echo $tags | tr ' ' '\n' | head -n 1)
fi
echo "::set-output name=REALEEVEEVERSION::$REALEEVEEVERSION"
echo "REALEEVEEVERSION=$REALEEVEEVERSION" >> $GITHUB_ENV
- name: Create Build Components folder
Expand Down

0 comments on commit c03ccf7

Please sign in to comment.