mirror of
https://github.com/sebastian-heinz/Arrowgene.DragonsDogmaOnline
synced 2026-08-03 11:12:41 -04:00
85 lines
No EOL
3.4 KiB
YAML
85 lines
No EOL
3.4 KiB
YAML
name: Create Release
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup .NET Core
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: 10.x
|
|
|
|
- name: Build Release
|
|
id: build_release
|
|
run: |
|
|
DDON_VERSION_FILE=${{ github.workspace }}/ddon.version
|
|
DDON_VERSION=$(<"$DDON_VERSION_FILE")
|
|
echo "DDON_VERSION=$DDON_VERSION" >> $GITHUB_ENV
|
|
echo "DDON_VERSION_E=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_ENV
|
|
mkdir ./release
|
|
for DDON_RUNTIME in win-x86 win-x64 linux-x64 osx-x64; do
|
|
# Server
|
|
dotnet publish Arrowgene.Ddon.Cli/Arrowgene.Ddon.Cli.csproj /p:Version=$DDON_VERSION /p:FromMSBuild=true --runtime $DDON_RUNTIME --configuration Release --output ./publish/$DDON_RUNTIME-$DDON_VERSION/Server
|
|
# ReleaseFiles
|
|
cp -r ./ReleaseFiles/. ./publish/$DDON_RUNTIME-$DDON_VERSION/
|
|
# Pack
|
|
tar cjf ./release/$DDON_RUNTIME-$DDON_VERSION.tar.gz ./publish/$DDON_RUNTIME-$DDON_VERSION
|
|
done
|
|
|
|
- name: Create Release
|
|
id: create_release
|
|
uses: actions/create-release@v1.0.0
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: release-${{ env.DDON_VERSION }}-${{ env.DDON_VERSION_E }}
|
|
release_name: Release ${{ env.DDON_VERSION }}-${{ env.DDON_VERSION_E }}
|
|
draft: false
|
|
prerelease: false
|
|
|
|
- name: Upload win-x86 Release Asset
|
|
uses: actions/upload-release-asset@v1.0.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./release/win-x86-${{ env.DDON_VERSION }}.tar.gz
|
|
asset_name: win-x86-${{ env.DDON_VERSION }}-${{ env.DDON_VERSION_E }}.tar.gz
|
|
asset_content_type: application/gzip
|
|
|
|
- name: Upload win-x64 Release Asset
|
|
uses: actions/upload-release-asset@v1.0.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./release/win-x64-${{ env.DDON_VERSION }}.tar.gz
|
|
asset_name: win-x64-${{ env.DDON_VERSION }}-${{ env.DDON_VERSION_E }}.tar.gz
|
|
asset_content_type: application/gzip
|
|
|
|
- name: Upload linux-x64 Release Asset
|
|
uses: actions/upload-release-asset@v1.0.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./release/linux-x64-${{ env.DDON_VERSION }}.tar.gz
|
|
asset_name: linux-x64-${{ env.DDON_VERSION }}-${{ env.DDON_VERSION_E }}.tar.gz
|
|
asset_content_type: application/gzip
|
|
|
|
- name: Upload osx-x64 Release Asset
|
|
uses: actions/upload-release-asset@v1.0.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./release/osx-x64-${{ env.DDON_VERSION }}.tar.gz
|
|
asset_name: osx-x64-${{ env.DDON_VERSION }}-${{ env.DDON_VERSION_E }}.tar.gz
|
|
asset_content_type: application/gzip |