Skip to content

Commit

Permalink
Change how releases are made
Browse files Browse the repository at this point in the history
- Parse the version number from the changelog
  • Loading branch information
JesseTG committed Nov 6, 2023
1 parent 8674560 commit 5613f26
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,7 @@ jobs:
- name: Get the Newest Tag
id: newest-tag
run: |
echo "version=`git tag --list "v[0-9]*.[0-9]*.[0-9]*" --sort=-v:refname | head -n1`" >> "$GITHUB_OUTPUT"
- name: Create Tag
if: "${{ steps.changelog.outputs.version != steps.newest-tag.outputs.version }}"
# If the latest tag is not the same as the latest changelog version, that means it's time for a new release
uses: joutvhu/create-tag@v1
with:
tag_name: "v${{ steps.changelog.outputs.version }}"
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
echo "version=`git tag --list "v[0-9]*.[0-9]*.[0-9]*" --sort=-v:refname | head -n1 | cut -c2-`" >> "$GITHUB_OUTPUT"
- name: Download Artifacts
if: "${{ steps.changelog.outputs.version != steps.newest-tag.outputs.version }}"
uses: actions/download-artifact@v3
Expand All @@ -164,6 +156,8 @@ jobs:
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.RELEASE_TOKEN }}
tag_name: "v${{ steps.changelog.outputs.version }}"
body: "${{ steps.changelog.outputs.release-notes }}"
files: |
artifact/melondsds_libretro-win32-x86_64-Release.zip
artifact/melondsds_libretro-macos-universal-Release.zip
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ and this project roughly adheres to [Semantic Versioning](https://semver.org/spe

Nothing right now.

## [0.7.9] - 2023-11-06

This is an overview of this release's changes.

### Fixed

- Still another test release.

## [0.7.8] - 2023-11-06

This is an overview of this release's changes.
Expand Down
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ if (CMAKE_MESSAGE_LOG_LEVEL)
message(STATUS "Message log level is set to ${CMAKE_MESSAGE_LOG_LEVEL}")
endif ()

# Parse the latest version from CHANGELOG.md, so we don't have to specify it in multiple places.
file(STRINGS "CHANGELOG.md" CHANGELOG REGEX "^## \\[([0-9]+\\.[0-9]+\\.[0-9]+)\\].+")
list(TRANSFORM CHANGELOG REPLACE "^## \\[([0-9]+\\.[0-9]+\\.[0-9]+)\\].+" "\\1")
list(SORT CHANGELOG COMPARE NATURAL ORDER DESCENDING)
list(GET CHANGELOG 0 VERSION)

project("melonDS DS"
VERSION "0.7.6"
VERSION "${VERSION}"
DESCRIPTION "A remake of the libretro melonDS core that prioritizes standalone parity, reliability, and usability. This core closely follows the feature set of standalone melonDS; it features OpenGL-accelerated upscaling, multiple screen layouts, and Wi-Fi emulation."
HOMEPAGE_URL "https://melonds.kuribo64.net"
LANGUAGES C CXX)
Expand Down

0 comments on commit 5613f26

Please sign in to comment.