Skip to content

Fix mod copying when default name is used (#1633) #patch #344

Fix mod copying when default name is used (#1633) #patch

Fix mod copying when default name is used (#1633) #patch #344

Workflow file for this run

name: Create release
on:
push:
tags:
- '*'
jobs:
create_release:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.previoustag.outputs.tag }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Get previous tag"
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
- name: "Build changelog"
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v4
with:
configuration: ".github/config/changelog-config.json"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Create release"
id: create_release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.previoustag.outputs.tag }}
body: ${{ steps.build_changelog.outputs.changelog }}
token: ${{ secrets.API_TOKEN_GITHUB }}
add_release_archive:
needs: create_release
runs-on: ${{ matrix.os }}
environment: "Build Environment"
strategy:
fail-fast: false
matrix:
build:
- win-x64
- linux-x64
- osx-arm64
include:
- build: win-x64
os: windows-latest
archive_type: zip
archive_extension: .zip
asset_content_type: application/zip
- build: linux-x64
os: ubuntu-22.04
archive_type: tar
archive_extension: .tgz
asset_content_type: application/gzip
- build: osx-arm64
os: macos-latest
archive_type: tar
archive_extension: .tgz
asset_content_type: application/gzip
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: "Add version to version.txt"
shell: bash
run: |
cd ImperatorToCK3/Data_Files/configurables
printf "\nversion = ${{ needs.create_release.outputs.tag }}" >> version.txt
- name: "Setup Dotnet for use with actions"
uses: actions/setup-dotnet@v4
with:
global-json-file: Fronter.NET/global.json
- name: "Replace frontend background image"
run: |
rm Fronter.NET/Fronter.NET/Assets/Images/background.png
cp ImperatorToCK3/Resources/images/SteamMainImage.png Fronter.NET/Fronter.NET/Assets/Images/background.png
- name: "Build frontend"
uses: ./Fronter.NET/.github/actions/build_frontend
with:
fronter_dir: 'Fronter.NET'
release_dir: 'Publish'
env:
BACKBLAZE_KEY_ID: ${{ secrets.BACKBLAZE_KEY_ID }}
BACKBLAZE_APPLICATION_KEY: ${{ secrets.BACKBLAZE_APPLICATION_KEY }}
BACKBLAZE_BUCKET_ID: ${{ secrets.BACKBLAZE_BUCKET_ID }}
- name: "Setup Dotnet for use with actions"
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: "Build backend"
working-directory: ImperatorToCK3
shell: bash
run: |
dotnet publish -p:PublishProfile=${{ matrix.build }} -c:Release --output:"../Publish/ImperatorToCK3"
if [ "$RUNNER_OS" = "macOS" ]
then
echo "Signing binary..."
codesign --force -s - "../Publish/ImperatorToCK3/ImperatorToCK3Converter"
echo "Verifying signature..."
codesign -dv --verbose=4 "../Publish/ImperatorToCK3/ImperatorToCK3Converter"
fi
- name: "Save commit ID"
shell: bash
run: |
git rev-parse HEAD > Publish/commit_id.txt
- name: "Archive Publish folder"
uses: thedoctor0/zip-release@master
with:
type: '${{ matrix.archive_type }}'
directory: 'Publish'
path: '.'
filename: '../ImperatorToCK3-${{ matrix.build }}${{ matrix.archive_extension }}'
- name: "Upload release asset"
id: upload-release-asset
uses: alexellis/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
asset_paths: '["./ImperatorToCK3-${{ matrix.build }}${{ matrix.archive_extension }}"]'