Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ permissions:
packages: read

jobs:
preview:
build:
# Only run for local PRs
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
env:
DOTNET_VERSION: 9.0
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/pr-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ permissions:
contents: read

jobs:
preview:
preview-version:
# Only run for local PRs
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest

steps:
Expand All @@ -29,8 +31,8 @@ jobs:
git fetch --tags || true
current=$(git describe --tags --abbrev=0 2>/dev/null || true)
if [ -z "$current" ]; then
echo "No tags found, defaulting to v0.0.0"
current="v0.0.0"
echo "No tags found, defaulting to 0.0.0"
current="0.0.0"
fi

# Remove leading 'v' then extract parts using awk
Expand All @@ -49,7 +51,7 @@ jobs:
patch=$((patch+1)); type="patch"
fi

next="v${major}.${minor}.${patch}"
next="${major}.${minor}.${patch}"

# Safely write outputs
if [ -n "$GITHUB_OUTPUT" ]; then
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/rc-build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release new version
name: Release new RC release

on:
push:
Expand Down Expand Up @@ -62,6 +62,11 @@ jobs:
echo "new_version=$new_version" >> $GITHUB_OUTPUT
echo "hash_version=$hash_version" >> $GITHUB_OUTPUT

- name: Update RC tag
run: |
git tag -f rc
git push origin rc --force

- name: Setup NuGet source
run: |
dotnet nuget add source \
Expand Down Expand Up @@ -195,8 +200,3 @@ jobs:
./build_artifacts/version.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update RC tag
run: |
git tag -f rc
git push origin rc --force
25 changes: 13 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ jobs:
git fetch --tags || true
current=$(git describe --tags --abbrev=0 2>/dev/null || true)
if [ -z "$current" ]; then
echo "No tags found, defaulting to v0.0.0"
current="v0.0.0"
echo "No tags found, defaulting to 0.0.0"
current="0.0.0"
fi

# Remove leading 'v' then extract parts using awk
Expand All @@ -69,6 +69,15 @@ jobs:
echo "prev_version=$current" >> $GITHUB_OUTPUT
echo "new_version=$new_version" >> $GITHUB_OUTPUT

- name: Tag and push new version
run: |
git config user.name "github-actions"
git config user.email "actions@github.com"

NEW_VERSION="${{ steps.version.outputs.new_version }}"
git tag "$NEW_VERSION"
git push origin "$NEW_VERSION"

- name: Setup NuGet source
run: |
dotnet nuget add source \
Expand Down Expand Up @@ -106,18 +115,10 @@ jobs:
mv ${{ env.LAUNCHER_OUTPUT_PATH }}/StarMap.Launcher.exe ${{ env.LAUNCHER_OUTPUT_PATH }}/StarMap.exe
mv ${{ env.STANDALONE_OUTPUT_PATH }}/StarMap.Loader.exe ${{ env.STANDALONE_OUTPUT_PATH }}/StarMap.exe

- name: Tag and push new version
run: |
git config user.name "github-actions"
git config user.email "actions@github.com"

NEW_VERSION="${{ steps.version.outputs.new_version }}"
git tag "$NEW_VERSION"
git push origin "$NEW_VERSION"
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: rc-build
name: publish
path: |
${{ env.LAUNCHER_OUTPUT_PATH }}
${{ env.STANDALONE_OUTPUT_PATH }}
Expand Down Expand Up @@ -250,7 +251,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: publish
path: publish
path: ./build_artifacts

# Install Inno Setup via Chocolatey
- name: Install Inno Setup
Expand Down
Loading