Files
spotify-honorific/.github/workflows/release.yml
Administrator 885119dc47
All checks were successful
Build and Release / Build (push) Successful in 24s
yes
2025-12-18 10:19:45 +02:00

57 lines
1.6 KiB
YAML

name: Build and Release
on:
push:
tags:
- "*.*.*.*"
jobs:
Build:
runs-on: ubuntu-latest
env:
DALAMUD_HOME: /tmp/dalamud
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 10.0.x
- name: Download Dalamud Latest
run: |
wget https://kamori.goats.dev/File/Get/ad4daeb959d7549f9cc8ba721cddc84e5382819a37ff38bfb9439a9e4fd3fb7d -O ${{ env.DALAMUD_HOME }}.zip
unzip ${{ env.DALAMUD_HOME }}.zip -d ${{ env.DALAMUD_HOME }}
- name: Restore Project
run: dotnet restore
- name: Build Project
run: dotnet build --configuration Release SpotifyHonorific/SpotifyHonorific.csproj -p:AssemblyVersion=${{ github.ref_name }}
- name: Create Release Asset
run: |
cd SpotifyHonorific/bin/Release
zip -r ../../../latest.zip .
cd ../../..
- name: Create Release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload Release Asset with curl
run: |
curl \
-X POST \
-H "Authorization: token ${{ github.token }}" \
-H "Content-Type: application/zip" \
--data-binary @latest.zip \
"${{ steps.create_release.outputs.upload_url }}?name=latest.zip"