Skip to content

Update README.md

Update README.md #14

Workflow file for this run

name: .NET
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: Restore dependencies
run: dotnet restore ./TSEconomy/TSEconomy.csproj
- name: Build
run: dotnet build ./TSEconomy/TSEconomy.csproj --no-restore
- name: Organize Artifacts
run: |
mkdir -p ./TSEconomyBuild/ServerPlugins
mkdir -p ./TSEconomyBuild/bin
mv ./TSEconomy/bin/Debug/net6.0/* ./TSEconomyBuild/ServerPlugins/
mv ./TSEconomy/deps/* ./TSEconomyBuild/bin/
- name: Zip the Artifacts
run: zip -r TSEconomyBuild.zip ./TSEconomyBuild
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.3
with:
name: TSEconomyBuild
path: ./TSEconomyBuild.zip
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: TSEconomyBuild
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: preview-${{ github.run_number }}
release_name: Preview Release ${{ github.run_number }}
draft: false
prerelease: true
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./TSEconomyBuild.zip
asset_name: TSEconomyBuild-Preview-${{ github.run_number }}.zip
asset_content_type: application/zip