Skip to content

Merge pull request #112 from HoI4-LOTRMod-Team/dev #4

Merge pull request #112 from HoI4-LOTRMod-Team/dev

Merge pull request #112 from HoI4-LOTRMod-Team/dev #4

on:
push:
branches:
- master
name: Create Release
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get current date and time in CEST, and compatible version from descriptor.mod
id: get-version
run: |
# Read compatible version from descriptor.mod and remove quotes
compatible_version=$(grep -oP 'supported_version="\K[0-9]+\.[0-9]+\.\*' descriptor.mod | sed 's/"//g')
# Get current date and time in CEST
date_time=$(TZ="Europe/Paris" date +'%d-%m-%Y_%H-%M')
echo "compatible_version=$compatible_version" >> $GITHUB_OUTPUT
echo "date_time=$date_time" >> $GITHUB_OUTPUT
- name: Create Release
id: create_release
uses: ncipollo/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.LOTR_MOD_RELEASE_TOKEN }}
with:
tag: ${{ steps.get-version.outputs.date_time }}
name: ${{ steps.get-version.outputs.date_time }}
body: |
Compatible HoI4 Version: v${{ steps.get-version.outputs.compatible_version }}
draft: false
prerelease: false