Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 12 additions & 24 deletions .github/workflows/build_prerelease.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
name: build_prerelease
on:
workflow_dispatch:
inputs:
romfs_version:
type: string
description: 'The romfs version tag to use'
required: true
default: 'latest'
push:
branches:
- dev

jobs:
# bump the version and build the changelog
Expand All @@ -18,18 +14,16 @@ jobs:
version: ${{ steps.push_tag.outputs.version }}
changelog: ${{ steps.github_changelog.outputs.changelog }}
steps:
# fail out if this is not a merge commit
- name: ensure merge
if: ${{ !startsWith(github.event.head_commit.message, 'Merge') }}
run: exit 1

- name: checkout version
uses: actions/checkout@v6.0.2
with:
fetch-depth: 0

# fail out if this is not a merge commit
- name: ensure merge
run: |
if ! git log -1 --pretty=%s | grep -q "^Merge"; then
exit 1
fi

- name: get last merge
id: last_merge
shell: bash
Expand Down Expand Up @@ -174,16 +168,10 @@ jobs:
uses: actions/checkout@v6.0.2

- id: romfs_version
shell: bash
run: |
if [ "${{ inputs.romfs_version }}" = "latest" ]; then
RELEASE=$(curl -s -H "Authorization: Bearer ${{ secrets.RELEASE_TOKEN }}" \
https://api.github.com/repos/HDR-Development/romfs-release/releases/latest \
| python3 -c "import sys,json; print(json.load(sys.stdin)['tag_name'])")
echo "release=$RELEASE" >> $GITHUB_OUTPUT
else
echo "release=${{ inputs.romfs_version }}" >> $GITHUB_OUTPUT
fi
uses: pozetroninc/github-action-get-latest-release@master
with:
token: ${{ secrets.RELEASE_TOKEN }}
repository: HDR-Development/romfs-release

- name: Download romfs
id: get_romfs
Expand Down
Loading