Skip to content

Commit 67ff7e9

Browse files
committed
Release version 24.0.2
1 parent 39ffbcb commit 67ff7e9

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,14 @@ jobs:
2828
echo 'Removes tags <sub> and </sub>'
2929
sed -i 's/<\/\?sub>//g' README.md
3030
cat README.md
31-
- name: Install XML tools
31+
- name: Install tools
3232
run: |
3333
sudo apt update
3434
sudo apt install libxml2-utils xmlstarlet
35+
get_latest_release() {
36+
curl --silent "https://api.github.com/repos/$1/releases/latest" | jq -r .tag_name
37+
}
38+
get_latest_release "ThreeMammals/Ocelot"
3539
- name: Read XML
3640
id: xml
3741
run: |
@@ -41,10 +45,14 @@ jobs:
4145
xml_value=$(xmllint --xpath "string((//Project/ItemGroup)[2]/PackageReference[@Include='Ocelot']/@Version)" ./src/Ocelot.Testing.csproj)
4246
echo "Ocelot Ref Ver: $xml_value"
4347
echo "OcelotRefVer=$xml_value" >> $GITHUB_OUTPUT
48+
oc_latest_release=$(curl "https://api.github.com/repos/ThreeMammals/Ocelot/releases/latest" | jq -r .tag_name)
49+
echo "Ocelot Ver: $oc_latest_release"
50+
echo "OcelotVer=$oc_latest_release" >> $GITHUB_OUTPUT
4451
- name: Replace Version
4552
id: ver
4653
run: |
4754
echo "Version: ${{ steps.xml.outputs.Version }}"
55+
echo "Ocelot Ver: ${{ steps.xml.outputs.OcelotVer }}"
4856
echo "Ocelot Ref Ver: ${{ steps.xml.outputs.OcelotRefVer }}"
4957
s_Version="${{ steps.xml.outputs.Version }}"
5058
if [[ "$s_Version" == *-* ]]; then
@@ -83,13 +91,13 @@ jobs:
8391
uses: softprops/action-gh-release@v2
8492
env:
8593
PACKAGE_VERSION: ${{ steps.ver.outputs.PkgVersion }}
86-
OCELOT_VERSION: ${{ steps.xml.outputs.OcelotRefVer }}
94+
OCELOT_VERSION: ${{ steps.xml.outputs.OcelotVer }}
8795
with:
88-
# tag_name: 0.0.5 # Name of a tag. defaults to github.ref_name
96+
# tag_name: 24.0.2 # Name of a tag. defaults to github.ref_name
8997
body: |
9098
## Version [${{ env.PACKAGE_VERSION }}](https://www.nuget.org/packages/Ocelot.Testing/${{ env.PACKAGE_VERSION }})
91-
- Ocelot dependency package: v[${{ env.OCELOT_VERSION }}](https://www.nuget.org/packages/Ocelot/${{ env.OCELOT_VERSION }})
92-
- For Ocelot release: [${{ env.OCELOT_VERSION }}](https://github.com/ThreeMammals/Ocelot/releases/tag/${{ env.OCELOT_VERSION }})
99+
- Ocelot package: v[${{ env.OCELOT_VERSION }}](https://www.nuget.org/packages/Ocelot/${{ env.OCELOT_VERSION }})
100+
- Ocelot release: [${{ env.OCELOT_VERSION }}](https://github.com/ThreeMammals/Ocelot/releases/tag/${{ env.OCELOT_VERSION }})
93101
files: |
94102
packages/*.*pkg
95103
draft: false

0 commit comments

Comments
 (0)