Skip to content

init commit

init commit #1

Workflow file for this run

name: run dotnet build
permissions:
contents: write
env:
PLUGIN_NAME: HostWorkshopMapPlugin
on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.x"
- name: Format version string
id: vars
run: echo "version_string=$(echo ${{github.ref_name}} | sed 's/^v//')" >> $GITHUB_ENV
- name: Build
run: dotnet build /p:PluginVersion=${{ env.version_string }}.${{ github.run_number }}
- name: Package
run: |
mkdir -p ./build/plugins/${{ env.PLUGIN_NAME }}
cp -R ./bin/Debug/net8.0/* ./build/plugins/${{ env.PLUGIN_NAME }}
- name: Create folders
run: |
mkdir /home/runner/releases
- name: Archive
run: |
cd build
tar -czvf /home/runner/releases/${{ env.PLUGIN_NAME }}-${{ github.ref_name }}.tar.gz .
zip -r /home/runner/releases/${{ env.PLUGIN_NAME }}-${{ github.ref_name }}.zip *
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
/home/runner/releases/${{ env.PLUGIN_NAME }}-${{ github.ref_name }}.tar.gz
/home/runner/releases/${{ env.PLUGIN_NAME }}-${{ github.ref_name }}.zip
generate_release_notes: true
prerelease: false