This repository has been archived by the owner on Jun 27, 2024. It is now read-only.
GitHub Deployment #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GitHub Deployment | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Plugin Version (SemVer: https://semver.org)' | |
required: true | |
jobs: | |
deploy: | |
name: "OpenMod Installer for RocketMod Deployment" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
name: Checkout Repository | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 5.0.100 | |
- name: Install dependencies | |
run: dotnet restore src/OpenMod.Installer.RocketMod.csproj | |
- name: Update version | |
run: "sed -i \"s#<Version>0.0.0</Version>#<Version>${{ github.event.inputs.version }}</Version>#\" src/OpenMod.Installer.RocketMod.csproj" | |
- name: Build | |
run: dotnet build src/OpenMod.Installer.RocketMod.csproj --configuration Release --no-restore | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
tag_name: ${{ github.event.inputs.version }} | |
release_name: v${{ github.event.inputs.version }} | |
draft: false | |
prerelease: false | |
- name: Upload release asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./src/bin/Release/net461/OpenMod.Installer.RocketMod.dll | |
asset_name: OpenMod.Installer.RocketMod-v${{ github.event.inputs.version }}.dll | |
asset_content_type: application/octet-stream |