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

Commit

Permalink
ci: add version.txt file to build folder
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-hosseini-deriv committed Dec 7, 2023
1 parent 31a2e83 commit 706ec96
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/actions/versioning/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ inputs:
description: Release Type
required: false
default: staging
RELEASE_TAG:
description: Release Tag
required: true
runs:
using: composite
steps:
- name: Tag build
run: echo "${{ inputs.RELEASE_TYPE }} $(date -u +'%Y-%m-%dT%H:%M:%SZ')" > build/version
run: echo "${{ inputs.RELEASE_TYPE }}--GITHUB_REF:${{ inputs.RELEASE_TAG }}--DATE:$(date -u +'%Y-%m-%dT%H:%M:%SZ')" > build/version.txt
shell: bash
1 change: 1 addition & 0 deletions .github/workflows/release_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- name: Versioning
uses: ./.github/actions/versioning
with:
RELEASE_TAG: ${{ github.ref_name }}
RELEASE_TYPE: production
- name: Extract version
id: extract_version
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ jobs:
uses: ./.github/actions/build
with:
NODE_ENV: staging
- name: Versioning
uses: ./.github/actions/versioning
with:
RELEASE_TAG: ${{ github.sha }}
RELEASE_TYPE: staging
- name: Publish to Cloudflare Pages Staging
uses: ./.github/actions/publish_to_pages_staging
with:
Expand Down

0 comments on commit 706ec96

Please sign in to comment.