Skip to content

Commit

Permalink
chore: Fix release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
magicus committed Apr 20, 2024
1 parent b3e2973 commit d66e89a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Release on tag

on:
workflow_dispatch:
push:
tags:
- '*'
Expand Down Expand Up @@ -36,7 +37,8 @@ jobs:
id: version
run: |
# Extract mod and minecraft version from tag
mod_version=${GITHUB_REF_NAME//@(*v|+*)}
mod_version=${GITHUB_REF_NAME#v}
mod_version="${mod_version%+*}"
minecraft_version=${GITHUB_REF_NAME#*+}
echo "mod=$mod_version" >> $GITHUB_OUTPUT
echo "minecraft=$minecraft_version" >> $GITHUB_OUTPUT
Expand All @@ -51,14 +53,18 @@ jobs:

- name: Parse changelog
id: changelog
continue-on-error: true
run: |
# Extract the changelog entry for this release
mkdir -p output
changelog=output/changelog.md
parse-changelog CHANGELOG.md ${{ steps.version.outputs.full }} > $changelog
parse-changelog CHANGELOG.md ${{ steps.version.outputs.full }} > $changelog || true
if [[ ! -s $changelog ]]; then
# No changelog for specific version (mod+minecraft), try just mod version
parse-changelog CHANGELOG.md ${{ steps.version.outputs.mod }} > $changelog
parse-changelog CHANGELOG.md ${{ steps.version.outputs.mod }} > $changelog || true
fi
if [[ ! -s $changelog ]]; then
echo "No changelog available" > $changelog
fi
echo Extracted changelog for this release:
cat $changelog
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 1.1.0+1.19.4 - 2024-04-20

### Added

- Support for Minecraft 1.19.4

## 1.1.0+1.19.3 - 2023-03-16

### Added
Expand Down

0 comments on commit d66e89a

Please sign in to comment.