fix(releases): Updates releases (#478)
- [X] Updates the workflows - [X] Removes automatic releases. Notes: We may need multiple release updates to get this right.
This commit is contained in:
parent
358839183d
commit
7c7490d3b4
3 changed files with 43 additions and 105 deletions
10
.github/workflows/build-test.yml
vendored
10
.github/workflows/build-test.yml
vendored
|
|
@ -26,12 +26,8 @@ jobs:
|
||||||
- name: Setup .NET 5
|
- name: Setup .NET 5
|
||||||
uses: actions/setup-dotnet@v1
|
uses: actions/setup-dotnet@v1
|
||||||
with:
|
with:
|
||||||
dotnet-version: 5.0.100
|
dotnet-version: 5.0.102
|
||||||
- name: Restore NuGet Packages
|
- name: Build
|
||||||
run: dotnet restore --force-evaluate
|
run: ./publish.cmd
|
||||||
- name: Build Server
|
|
||||||
run: dotnet build -c Release --no-restore Projects/Server/Server.csproj
|
|
||||||
- name: Build UO Content
|
|
||||||
run: dotnet build -c Release --no-restore Projects/UOContent/UOContent.csproj
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: dotnet test --no-restore
|
run: dotnet test --no-restore
|
||||||
|
|
|
||||||
97
.github/workflows/create-release.yml
vendored
97
.github/workflows/create-release.yml
vendored
|
|
@ -1,17 +1,13 @@
|
||||||
name: Create Release
|
name: Create Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
repository_dispatch:
|
||||||
branches:
|
types: [release]
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
name: Create Release
|
name: Create Release
|
||||||
if: "contains(github.event.head_commit.message, 'Release') || contains(github.event.head_commit.message, 'release')"
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
|
||||||
skipped: ${{ steps.changelog.outputs.skipped }}
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
|
|
@ -19,77 +15,40 @@ jobs:
|
||||||
- name: Setup .NET 5
|
- name: Setup .NET 5
|
||||||
uses: actions/setup-dotnet@v1
|
uses: actions/setup-dotnet@v1
|
||||||
with:
|
with:
|
||||||
dotnet-version: 5.0.100
|
dotnet-version: 5.0.102
|
||||||
- uses: dotnet/nbgv@master
|
- name: Setup Node.js
|
||||||
id: nbgv
|
uses: actions/setup-node@v1
|
||||||
- name: Conventional Changelog
|
|
||||||
id: changelog
|
|
||||||
uses: TriPSs/conventional-changelog-action@v3
|
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.github_token }}
|
node-version: 14
|
||||||
output-file: false
|
- name: Install NGBV
|
||||||
skip-version-file: true
|
uses: dotnet/nbgv@master
|
||||||
skip-commit: true
|
id: nbgv
|
||||||
|
|
||||||
|
- name: Githug Changelog Generator
|
||||||
|
id: changelog
|
||||||
|
uses: heinrichreimer/github-changelog-generator-action@v2.1.1
|
||||||
|
with:
|
||||||
|
onlyLastTag: true,
|
||||||
|
stripeHeaders: true,
|
||||||
|
stripeGeneratorNotice: true,
|
||||||
|
pullRequests: true,
|
||||||
|
prWoLabels: true,
|
||||||
|
httpCache: true,
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
run: npx semantic-release
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
id: create_release
|
id: create_release
|
||||||
uses: actions/create-release@v1
|
uses: actions/create-release@v1
|
||||||
if: ${{ steps.changelog.outputs.skipped == 'false' }}
|
|
||||||
with:
|
with:
|
||||||
body: ${{ steps.changelog.outputs.clean_changelog }}
|
body: ${{ steps.changelog.outputs.changelog }}
|
||||||
tag_name: ${{ steps.nbgv.outputs.Version }}
|
tag_name: ${{ steps.nbgv.outputs.Version }}
|
||||||
release_name: ${{ steps.nbgv.outputs.Version }}
|
release_name: ${{ steps.nbgv.outputs.Version }}
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Output Release URL File
|
|
||||||
if: ${{ steps.changelog.outputs.skipped == 'false' }}
|
|
||||||
run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt
|
|
||||||
- name: Save Release URL file
|
|
||||||
if: ${{ steps.changelog.outputs.skipped == 'false' }}
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: release_url
|
|
||||||
path: release_url.txt
|
|
||||||
|
|
||||||
publish:
|
|
||||||
name: Publish Release Asset
|
|
||||||
if: "(contains(github.event.head_commit.message, 'Release') || contains(github.event.head_commit.message, 'release')) && ${{ needs.release.outputs.skipped == 'false' }}"
|
|
||||||
needs: [release]
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [win, ubuntu.16.04, ubuntu.18.04, ubuntu.20.04, debian.9, debian.10, centos.7, centos.8, osx]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
|
|
||||||
- name: Setup .NET 5
|
|
||||||
uses: actions/setup-dotnet@v1
|
|
||||||
with:
|
|
||||||
dotnet-version: 5.0.100
|
|
||||||
- uses: dotnet/nbgv@master
|
|
||||||
id: nbgv
|
|
||||||
- name: Load Release URL File from release job
|
|
||||||
uses: actions/download-artifact@v1
|
|
||||||
with:
|
|
||||||
name: release_url
|
|
||||||
- name: Get Release File Name & Upload URL
|
|
||||||
id: get_release_info
|
|
||||||
run: |
|
|
||||||
value=`cat release_url/release_url.txt`
|
|
||||||
echo ::set-output name=upload_url::$value
|
|
||||||
rm -rf ./release_url
|
|
||||||
- name: Publish Distribution
|
|
||||||
run: ./publish.cmd release ${{ matrix.os }}
|
|
||||||
- name: Create Artifact
|
|
||||||
run: rm -rf ./Projects/*/bin && rm -rf ./Projects/*/obj && zip -9 -r modernuo-asset.zip ./*
|
|
||||||
- name: Upload Release
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.get_release_info.outputs.upload_url }}
|
|
||||||
asset_path: ./modernuo-asset.zip
|
|
||||||
asset_name: modernuo-${{ matrix.os }}-x64-${{ steps.nbgv.outputs.Version }}.zip
|
|
||||||
asset_content_type: application/zip
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
|
||||||
|
|
@ -18,14 +18,10 @@ jobs:
|
||||||
displayName: 'Install .NET 5'
|
displayName: 'Install .NET 5'
|
||||||
inputs:
|
inputs:
|
||||||
packageType: sdk
|
packageType: sdk
|
||||||
version: '5.0.100'
|
version: '5.0.102'
|
||||||
- task: NuGetAuthenticate@0
|
- task: NuGetAuthenticate@0
|
||||||
- script: dotnet restore --force-evaluate --source https://api.nuget.org/v3/index.json
|
- script: ./publish.cmd Release win
|
||||||
displayName: 'Restore NuGet Packages'
|
displayName: 'Build'
|
||||||
- script: dotnet build -r win-x64 -c Release --no-restore Projects/Server/Server.csproj
|
|
||||||
displayName: 'Build Server'
|
|
||||||
- script: dotnet build -r win-x64 -c Release --no-restore Projects/UOContent/UOContent.csproj
|
|
||||||
displayName: 'Build UO Content'
|
|
||||||
- script: dotnet test --no-restore
|
- script: dotnet test --no-restore
|
||||||
displayName: 'Test'
|
displayName: 'Test'
|
||||||
|
|
||||||
|
|
@ -34,28 +30,19 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
'CentOS 8':
|
'CentOS 8':
|
||||||
containerImage: modernuo/centos-net5:8
|
containerImage: modernuo/centos-net5:8
|
||||||
os: centos.8-x64
|
os: centos.8
|
||||||
'CentOS 7':
|
'CentOS 7':
|
||||||
containerImage: centos:7
|
containerImage: centos:7
|
||||||
os: centos.7-x64
|
os: centos.7
|
||||||
'Debian 9':
|
|
||||||
containerImage: amd64/buildpack-deps:stretch
|
|
||||||
os: debian.9-x64
|
|
||||||
'Debian 10':
|
'Debian 10':
|
||||||
containerImage: amd64/buildpack-deps:buster
|
containerImage: mcr.microsoft.com/dotnet/sdk:5.0-buster-slim
|
||||||
os: debian.10-x64
|
os: debian.10
|
||||||
# 'Debian 11':
|
# 'Debian 11':
|
||||||
# containerImage: amd64/buildpack-deps:bullseye
|
# containerImage: amd64/buildpack-deps:bullseye
|
||||||
# os: debian.11-x64
|
# os: debian.11-x64
|
||||||
'Ubuntu 16':
|
|
||||||
containerImage: amd64/buildpack-deps:xenial
|
|
||||||
os: ubuntu.16.04-x64
|
|
||||||
'Ubuntu 18':
|
|
||||||
containerImage: amd64/buildpack-deps:bionic
|
|
||||||
os: ubuntu.18.04-x64
|
|
||||||
'Ubuntu 20':
|
'Ubuntu 20':
|
||||||
containerImage: amd64/buildpack-deps:focal
|
containerImage: mcr.microsoft.com/dotnet/sdk:5.0-focal
|
||||||
os: ubuntu.20.04-x64
|
os: ubuntu.20.04
|
||||||
|
|
||||||
displayName: Linux
|
displayName: Linux
|
||||||
|
|
||||||
|
|
@ -69,13 +56,9 @@ jobs:
|
||||||
displayName: 'Install .NET 5'
|
displayName: 'Install .NET 5'
|
||||||
inputs:
|
inputs:
|
||||||
packageType: sdk
|
packageType: sdk
|
||||||
version: '5.0.100'
|
version: '5.0.102'
|
||||||
- task: NuGetAuthenticate@0
|
- task: NuGetAuthenticate@0
|
||||||
- script: dotnet restore --force-evaluate --source https://api.nuget.org/v3/index.json
|
- script: ./publish.cmd Release $(os)
|
||||||
displayName: 'Restore NuGet Packages'
|
displayName: 'Build'
|
||||||
- script: dotnet build -r $(os) -c Release --no-restore Projects/Server/Server.csproj
|
|
||||||
displayName: 'Build Server'
|
|
||||||
- script: dotnet build -r $(os) -c Release --no-restore Projects/UOContent/UOContent.csproj
|
|
||||||
displayName: 'Build UO Content'
|
|
||||||
- script: dotnet test --no-restore
|
- script: dotnet test --no-restore
|
||||||
displayName: 'Test'
|
displayName: 'Test'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue