Near final workflows
Updated workflows to release zips with the correct file names.
This commit is contained in:
parent
78fd09aa91
commit
2fa0bcb765
17
.github/workflows/dotnet-build.yml
vendored
17
.github/workflows/dotnet-build.yml
vendored
@ -5,11 +5,6 @@ name: build
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
version:
|
||||
type: string
|
||||
description: 'Libation version'
|
||||
required: true
|
||||
|
||||
env:
|
||||
DOTNET_VERSION: '7' # The .NET SDK version to use
|
||||
@ -28,9 +23,6 @@ jobs:
|
||||
ui: WinForms
|
||||
release_name: classic
|
||||
steps:
|
||||
- name: Lowercase os
|
||||
run: |
|
||||
echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
@ -45,14 +37,9 @@ jobs:
|
||||
dotnet publish -c ${{ env.DOTNET_CONFIGURATION }} -o bin\Publish\${{ matrix.os }}-${{ matrix.release_name }} LoadByOS\${{ matrix.os }}ConfigApp\${{ matrix.os }}ConfigApp.csproj -p:PublishProfile=LoadByOS\${{ matrix.os }}ConfigApp\PublishProfiles\${{ matrix.os }}Profile.pubxml
|
||||
dotnet publish -c ${{ env.DOTNET_CONFIGURATION }} -o bin\Publish\${{ matrix.os }}-${{ matrix.release_name }} LibationCli\LibationCli.csproj -p:PublishProfile=LibationCli\Properties\PublishProfiles\${{ matrix.os }}Profile.pubxml
|
||||
dotnet publish -c ${{ env.DOTNET_CONFIGURATION }} -o bin\Publish\${{ matrix.os }}-${{ matrix.release_name }} Hangover${{ matrix.ui }}\Hangover${{ matrix.ui }}.csproj -p:PublishProfile=Hangover${{ matrix.ui }}\Properties\PublishProfiles\${{ matrix.os }}Profile.pubxml
|
||||
- name: Rename release folder
|
||||
working-directory: ./Source
|
||||
run: ren ./bin/Publish/${{ matrix.os }}-${{ matrix.release_name }} Libation.${{ inputs.version }}-${{ matrix.os }}-${{ matrix.release_name }}
|
||||
- name: Zip artifact
|
||||
run: Compress-Archive ./Source/bin/Publish/Libation.${{ inputs.version }}-${{ matrix.os }}-${{ matrix.release_name }} Libation.${{ inputs.version }}-${{ matrix.os }}-${{ matrix.release_name }}.zip
|
||||
- name: Publish artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Libation.${{ inputs.version }}-${{ matrix.os }}-${{ matrix.release_name }}
|
||||
path: Libation.${{ inputs.version }}-${{ matrix.os }}-${{ matrix.release_name }}.zip
|
||||
name: ${{ matrix.os }}-${{ matrix.release_name }}
|
||||
path: ./Source/bin/Publish/${{ matrix.os }}-${{ matrix.release_name }}/*
|
||||
if-no-files-found: error
|
||||
33
.github/workflows/dotnet-publish.yml
vendored
33
.github/workflows/dotnet-publish.yml
vendored
@ -16,17 +16,34 @@ env:
|
||||
jobs:
|
||||
build:
|
||||
uses: ./.github/workflows/dotnet-build.yml
|
||||
with:
|
||||
version: ${{ github.ref_name }}
|
||||
|
||||
publish:
|
||||
release:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download artifact
|
||||
- name: Calculate version
|
||||
id: version
|
||||
run: |
|
||||
export TAG=${{ github.ref_name }}
|
||||
echo "version=${TAG#v}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
path: artifacts
|
||||
|
||||
- name: Rename artifacts
|
||||
id: rename
|
||||
working-directory: ./artifacts
|
||||
run: for FILENAME in *; do mv ${FILENAME} Libation.${{ steps.version.outputs.version }}-${FILENAME,,}; done
|
||||
|
||||
- name: Zip assets
|
||||
working-directory: ./artifacts
|
||||
run: |
|
||||
for FILENAME in *; do zip -r ${FILENAME}.zip ${FILENAME}; done
|
||||
mkdir ./assets
|
||||
mv *.zip ./assets
|
||||
|
||||
- name: Create release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
@ -34,15 +51,15 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: Libation ${{ github.ref }}
|
||||
release_name: Libation ${{ steps.version.outputs.version }}
|
||||
body: <Put a body here>
|
||||
draft: true
|
||||
prerelease: false
|
||||
- name: Upload Release Assets
|
||||
id: upload-release-assets
|
||||
|
||||
- name: Upload release assets
|
||||
uses: dwenegar/upload-release-assets@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
release_id: ${{ steps.create_release.outputs.id }}
|
||||
assets_path: ./artifacts
|
||||
assets_path: ./artifacts/assets
|
||||
2
.github/workflows/dotnet-validate.yml
vendored
2
.github/workflows/dotnet-validate.yml
vendored
@ -17,5 +17,3 @@ env:
|
||||
jobs:
|
||||
build:
|
||||
uses: ./.github/workflows/dotnet-build.yml
|
||||
with:
|
||||
version: ${{ github.sha }}
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"WindowsClassic": "Libation\\.v\\d+\\.\\d+\\.\\d+-Windows-chardonnay\\.zip",
|
||||
"WindowsAvalonia":"Libation\\.v\\d+\\.\\d+\\.\\d+-Windows-chardonnay\\.zip",
|
||||
"LinuxAvalonia": "Libation\\.v\\d+\\.\\d+\\.\\d+-Linux-chardonnay",
|
||||
"MacOSAvalonia": "Libation\\.v\\d+\\.\\d+\\.\\d+-MacOS-chardonnay"
|
||||
"WindowsClassic": "Libation\\.\\d+\\.\\d+\\.\\d+-Windows-classic\\.zip",
|
||||
"WindowsAvalonia":"Libation\\.\\d+\\.\\d+\\.\\d+-Windows-chardonnay\\.zip",
|
||||
"LinuxAvalonia": "Libation\\.\\d+\\.\\d+\\.\\d+-Linux-chardonnay",
|
||||
"MacOSAvalonia": "Libation\\.\\d+\\.\\d+\\.\\d+-MacOS-chardonnay"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user