Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Commit 706ec96

Browse files
ci: add version.txt file to build folder
1 parent 31a2e83 commit 706ec96

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.github/actions/versioning/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ inputs:
55
description: Release Type
66
required: false
77
default: staging
8+
RELEASE_TAG:
9+
description: Release Tag
10+
required: true
811
runs:
912
using: composite
1013
steps:
1114
- name: Tag build
12-
run: echo "${{ inputs.RELEASE_TYPE }} $(date -u +'%Y-%m-%dT%H:%M:%SZ')" > build/version
15+
run: echo "${{ inputs.RELEASE_TYPE }}--GITHUB_REF:${{ inputs.RELEASE_TAG }}--DATE:$(date -u +'%Y-%m-%dT%H:%M:%SZ')" > build/version.txt
1316
shell: bash

.github/workflows/release_production.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
- name: Versioning
2525
uses: ./.github/actions/versioning
2626
with:
27+
RELEASE_TAG: ${{ github.ref_name }}
2728
RELEASE_TYPE: production
2829
- name: Extract version
2930
id: extract_version

.github/workflows/release_staging.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ jobs:
2121
uses: ./.github/actions/build
2222
with:
2323
NODE_ENV: staging
24+
- name: Versioning
25+
uses: ./.github/actions/versioning
26+
with:
27+
RELEASE_TAG: ${{ github.sha }}
28+
RELEASE_TYPE: staging
2429
- name: Publish to Cloudflare Pages Staging
2530
uses: ./.github/actions/publish_to_pages_staging
2631
with:

0 commit comments

Comments
 (0)