Skip to content

Update release.yml

Update release.yml #2

Workflow file for this run

name: Build and Release
on:
push:
tags:
- "v*.*.*.*"
jobs:
Build:
runs-on: ubuntu-latest
env:
DALAMUD_HOME: /tmp/dalamud
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Get Tag Name
run: echo "tag=$(echo ${{ github.ref }} | sed 's/refs\/tags\/v//')" >> $GITHUB_ENV
- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Download Dalamud Latest
run: |
wget https://goatcorp.github.io/dalamud-distrib/latest.zip -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 ChatContext/ChatContext.csproj -p:AssemblyVersion=${{ env.tag }}
- name: Create Release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: ${{ env.tag }}
tag_name: ${{ env.tag }}
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ChatContext/bin/Release/ChatContext/latest.zip
asset_name: ChatContext.zip
asset_content_type: application/zip
env:
GITHUB_TOKEN: ${{ github.token }}