Skip to content

Arkangel Dispatch

Arkangel Dispatch #110

Workflow file for this run

name: Arkangel Dispatch
on:
workflow_dispatch:
inputs:
changelogs:
description: 'changelogs'
required: true
type: string
concurrency:
group: production
cancel-in-progress: true
jobs:
publish:
runs-on: windows-latest
environment: github-publish
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
include-prerelease: true
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v5.5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Reset Tags
run: git fetch --tags
- name: Clean
run: dotnet clean WFBot.sln --configuration "Linux Release" && dotnet nuget locals all --clear
- name: Restore dependencies
run: dotnet restore
- name: Build
run: ./build-wfbot-ci.bat
env:
OFFICIAL_BUILD: official
- name: Zip Linux Arm Release
uses: DuckSoft/create-7z-action@v1.0
with:
pathSource: ./out/WFBotLinuxArm64S/WFBot
pathTarget: WFBot-linux-arm64.7z
- name: Zip Linux Release
uses: DuckSoft/create-7z-action@v1.0
with:
pathSource: ./out/WFBotLinuxX64S/WFBot
pathTarget: WFBot-linux-x64.7z
- name: Zip Windows Release
uses: DuckSoft/create-7z-action@v1.0
with:
pathSource: ./out/WFBotWindowsS/WFBot.exe
pathTarget: WFBot-win-x86.7z
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.11
with:
versionSpec: "5.x"
- name: Run GitVersion
id: gitversion
uses: gittools/actions/gitversion/execute@v0.9.11
- uses: suisei-cn/actions-download-file@v1.0.1
id: downloadfile1
name: Download Windows Wrapper
with:
url: "https://wfbot.cyan.cafe/api/WFBotWrapper/DownloadWrapperWindows"
target: ./
- uses: suisei-cn/actions-download-file@v1.0.1
id: downloadfile2
name: Download Linux Arm Wrapper
with:
url: "https://wfbot.cyan.cafe/api/WFBotWrapper/DownloadWrapperLinuxArm64"
target: ./
- uses: suisei-cn/actions-download-file@v1.0.1
id: downloadfile3
name: Download Linux Wrapper
with:
url: "https://wfbot.cyan.cafe/api/WFBotWrapper/DownloadWrapperLinuxX64"
target: ./
- name: Create a GitHub release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag_version.outputs.new_tag }}
release_name: ${{ steps.gitversion.outputs.informationalVersion }}
body: ${{ inputs.changelogs }}
- name: Upload WFBot Linux Arm Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./WFBot-linux-arm64.7z
asset_name: WFBot-linux-arm64.7z
asset_content_type: application/x-7z-compressed
- name: Upload WFBot Linux Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./WFBot-linux-x64.7z
asset_name: WFBot-linux-x64.7z
asset_content_type: application/x-7z-compressed
- name: Upload WFBot Windows Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./WFBot-win-x86.7z
asset_name: WFBot-win-x86.7z
asset_content_type: application/x-7z-compressed
- name: Upload WFBot Linux Arm Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.downloadfile2.outputs.filename }}
asset_name: WFBotWrapper-linux-arm64
asset_content_type: application/octet-stream
- name: Upload WFBot Windows Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.downloadfile1.outputs.filename }}
asset_name: WFBotWrapper-win-x86.exe
asset_content_type: application/octet-stream
- name: Upload WFBot Linux Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.downloadfile3.outputs.filename }}
asset_name: WFBotWrapper-linux-x64
asset_content_type: application/octet-stream
docker-publish:
runs-on: ubuntu-latest
environment: docker-publish
needs: publish
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Use Custom Dockerfile
run: |
rm Dockerfile
cp .github/Dockerfile .
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: trksteam/wfbot:latest
env:
OFFICIAL_BUILD: official