Skip to content

Commit 933cbdb

Browse files
committed
- build attempt #14
1 parent 8813edd commit 933cbdb

File tree

2 files changed

+35
-3
lines changed

2 files changed

+35
-3
lines changed

.github/workflows/release.yml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,41 @@ name: Build and Release Ori Launcher
33
on:
44
push:
55
tags: ['v*']
6-
workflow_dispatch: # Allow manual triggers
6+
workflow_dispatch:
77

88
permissions:
99
contents: write
1010

1111
jobs:
12+
sync-version:
13+
runs-on: ubuntu-latest
14+
if: startsWith(github.ref, 'refs/tags/')
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Sync package.json version with tag
21+
run: |
22+
# Extract version from tag (remove 'v' prefix)
23+
TAG_VERSION="${GITHUB_REF#refs/tags/v}"
24+
echo "Syncing package.json version to: $TAG_VERSION"
25+
26+
# Update package.json
27+
npm version $TAG_VERSION --no-git-tag-version --allow-same-version
28+
29+
# Verify the change
30+
echo "Updated package.json version: $(node -p "require('./package.json').version")"
31+
32+
- name: Upload updated package.json
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: updated-package
36+
path: package.json
37+
retention-days: 1
38+
1239
build-and-release:
40+
needs: sync-version
1341
strategy:
1442
matrix:
1543
include:
@@ -28,8 +56,12 @@ jobs:
2856
steps:
2957
- name: Checkout code
3058
uses: actions/checkout@v4
59+
60+
- name: Download updated package.json
61+
uses: actions/download-artifact@v4
3162
with:
32-
fetch-depth: 0
63+
name: updated-package
64+
path: ./
3365

3466
- name: Setup Node.js
3567
uses: actions/setup-node@v4

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ori-launcher",
3-
"version": "1.3.7",
3+
"version": "1.3.8",
44
"description": "Modern Custom Minecraft launcher",
55
"author": {
66
"name": "Cosmic-fi (Cosmic Boucher)",

0 commit comments

Comments
 (0)