Skip to content

fix: valheim

fix: valheim #141

name: .NET Build And Release
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Delete
uses: ame-yu/action-delete-latest-release@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Zip release
run: cd src/Sergen.Main/bin/Release/net6.0 ; zip -r ../../../../../release.zip . * ; cd ../../../../..
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: latest
release_name: CI Build
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./release.zip
asset_name: release.zip
asset_content_type: application/zip
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
script: ./SergenReleaseDrop/PullAndInstallSergen.sh