ci: change publish branch to ci #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
push: | |
branches: | |
- ci | |
jobs: | |
build-module: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.x | |
- name: Build | |
run: | | |
artifact=$(pwd)/bannerlord | |
mkdir -p $artifact; | |
proj="Bannerlord.ExpandedTemplate.Integration/Bannerlord.ExpandedTemplate.Integration.csproj"; | |
dotnet clean $proj --configuration Release; | |
dotnet build $proj --configuration Release -p:GameFolder="$artifact"; | |
- name: Install Bannerlord.ChangelogParser | |
run: dotnet tool install -g Bannerlord.ChangelogParser; | |
shell: pwsh | |
- name: Run ChangelogParser | |
id: changelog | |
run: | | |
vers="$(bannerlord_changelog_parser latestversion -f "$PWD/changelog.txt")" | |
echo "::set-output name=mod_version::$vers" | |
desc="$(bannerlord_changelog_parser fulldescription -f "$PWD/changelog.txt")" | |
desc="${desc//'%'/'%25'}" | |
desc="${desc//$'\n'/'%0A'}" | |
desc="${desc//$'\r'/'%0D'}" | |
echo "::set-output name=mod_description::$desc" | |
- name: Upload bannerlord folder | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bannerlord | |
path: ./bannerlord | |
########################### | |
# NUGET/GPR # | |
########################### | |
# publish-on-nuget: | |
# needs: [ "build-module" ] | |
# uses: BUTR/workflows/.github/workflows/release-nuget.yml@master | |
# with: | |
# project_path: Bannerlord.ExpandedTemplate.API/Bannerlord.ExpandedTemplate.API.csproj | |
# secrets: | |
# NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | |
########################### | |
# GITHUB # | |
########################### | |
publish-on-github: | |
needs: [ "build-module" ] | |
uses: BUTR/workflows/.github/workflows/release-github.yml@master | |
with: | |
mod_id: Bannerlord.ExpandedTemplate | |
mod_version: ${{ needs.build-module.outputs.mod_version }} | |
mod_description: ${{ needs.build-module.outputs.mod_description }} | |
artifact_name: bannerlord |