Skip to content

Commit c43202e

Browse files
committed
fix: set COMMIT_HASH environment variable in build and release workflows
1 parent 5b50730 commit c43202e

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

Diff for: .github/workflows/main.yml

+10-7
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,40 @@ on:
77
jobs:
88
build:
99
runs-on: ubuntu-latest
10-
10+
1111
steps:
1212
- uses: actions/checkout@v4
13-
13+
14+
- name: Set env.COMMIT_HASH
15+
run: echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
16+
1417
- name: Setup Bun
1518
uses: oven-sh/setup-bun@v1
1619
with:
1720
bun-version: latest
18-
21+
1922
- name: Install dependencies
2023
run: bun install
21-
24+
2225
- name: Build
2326
run: |
2427
mkdir -p bin
2528
bun run build-linux-x64
2629
bun run build-linux-arm64
2730
bun run build-windows-x64
28-
31+
2932
- name: Upload Linux x64
3033
uses: actions/upload-artifact@v4
3134
with:
3235
name: transit-linux-x64
3336
path: bin/transit-linux-x64
34-
37+
3538
- name: Upload Linux ARM64
3639
uses: actions/upload-artifact@v4
3740
with:
3841
name: transit-linux-arm64
3942
path: bin/transit-linux-arm64
40-
43+
4144
- name: Upload Windows x64
4245
uses: actions/upload-artifact@v4
4346
with:

Diff for: .github/workflows/release.yml

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ jobs:
2323
with:
2424
bun-version: latest
2525

26+
- name: Set env.COMMIT_HASH
27+
run: echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
28+
2629
- name: Extract version from commit message
2730
id: extract_version
2831
run: |

0 commit comments

Comments
 (0)