Skip to content

Commit

Permalink
Update test_release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
PassiveModding committed Nov 16, 2024
1 parent e5623dc commit e5452a1
Showing 1 changed file with 40 additions and 12 deletions.
52 changes: 40 additions & 12 deletions .github/workflows/test_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,37 @@ jobs:
with:
dotnet-version: 8.0.x

- name: Download Dalamud Library
- name: Download Dalamud Library
run: |
wget https://goatcorp.github.io/dalamud-distrib/latest.zip -O /tmp/dalamud.zip
unzip /tmp/dalamud.zip -d /tmp/dalamud
if [[ ${{ github.ref_name }} =~ ^testing_(.*)_v(.*)$ ]]; then
custom_path="${{BASH_REMATCH[1]}"
version="${BASH_REMATCH[2]}"
echo "Custom Path: $custom_path"
echo "Version: $version"
wget https://goatcorp.github.io/dalamud-distrib/$custom_path/latest.zip -O /tmp/dalamud.zip
else
version=$(echo ${{ github.ref_name }} | sed 's/testing_v//')
echo "Version: $version"
wget https://goatcorp.github.io/dalamud-distrib/latest.zip -O /tmp/dalamud.zip
fi
- name: Restore Dependencies
run: dotnet restore

- name: Build plugin in release mode
run: |
version=$(echo ${{ github.ref_name }} | sed 's/testing_v//')
echo "Version: $version"
dotnet build -c Release --no-restore --nologo -o ./bin/Release -p:Version=$version -p:AssemblyVersion=$version -p:FileVersion=$version
if [[ ${{ github.ref_name }} =~ ^testing_(.*)_v(.*)$ ]]; then
custom_path="${BASH_REMATCH[1]}"
version="${BASH_REMATCH[2]}"
echo "Custom Path: $custom_path"
echo "Version: $version"
dotnet build -c Release --no-restore --nologo -o ./bin/Release -p:Version=$version -p:AssemblyVersion=$version -p:FileVersion=$version
else
version=$(echo ${{ github.ref_name }} | sed 's/testing_v//')
echo "Version: $version"
dotnet build -c Release --no-restore --nologo -o ./bin/Release -p:Version=$version -p:AssemblyVersion=$version -p:FileVersion=$version
fi
- name: Generate Checksums
working-directory: Meddle/Meddle.Plugin/bin/Release/Meddle.Plugin
Expand Down Expand Up @@ -79,11 +97,21 @@ jobs:
- name: Update repo.json
run: |
cd ../../
release_version=$(echo "${{ github.ref_name }}" | sed 's/^testing_v//')
echo "Release Version: $release_version"
repo_url="$(echo "${{ github.server_url }}/${{ github.repository }}" | sed 's/#/\\#/g')"
echo "Repo URL: $repo_url"
if [[ ${{ github.ref_name }} =~ ^testing_(.*)_v(.*)$ ]]; then
custom_path="${BASH_REMATCH[1]}"
version="${BASH_REMATCH[2]}"
echo "Custom Path: $custom_path"
echo "Version: $version"
release_version=$version
repo_url="$(echo "${{ github.server_url }}/${{ github.repository }}" | sed 's/#/\\#/g')"
echo "Repo URL: $repo_url"
else
release_version=$(echo "${{ github.ref_name }}" | sed 's/testing_v//')
echo "Release Version: $release_version"
repo_url="$(echo "${{ github.server_url }}/${{ github.repository }}" | sed 's/#/\\#/g')"
echo "Repo URL: $repo_url"
fi
# Update the JSON file using jq
jq --arg release_version "$release_version" \
Expand Down

0 comments on commit e5452a1

Please sign in to comment.