Skip to content

Commit

Permalink
feat: Improved artifact naming with run number and timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
25Ericcheong committed May 3, 2024
1 parent 813481f commit f28129c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/deploy-to-prod.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Build and Deploy Binq Static Web
run-name: Building and Deployiing
run-name: Building and Deploying
on:
pull_request:
branches:
Expand All @@ -8,17 +8,18 @@ on:
- "!feature-**/"

env:
NODE_VERSION: "20.10.0"
ARTIFACT_RETENTION_DAYS: "90"
REPO_UPDATED_TIMESTAMP: github.event.repository.updated_at | sed 's/:/-/g'
NODE_VERSION: 20.10.0
ARTIFACT_RETENTION_DAYS: 90
TIMESTAMP: "(date +%Y-%m-%d-%H-%M-%S)"
RUN_NUM: "github.run_number"

jobs:
job_1_build:
name: Build and Upload Production Artifact
runs-on: ubuntu-latest

outputs:
artifact_name: "artifact_$REPO_UPDATED_TIMESTAMP"
artifact_name: "build_${{ env.TIMESTAMP }}"

steps:
- run: echo "Attempting to install required tools and build project"
Expand All @@ -39,7 +40,7 @@ jobs:
- name: Store production artifacts
uses: actions/upload-artifact@v4
with:
name: "artifact_${{ env.REPO_UPDATED_TIMESTAMP }}"
name: "artifact_${{ env.RUN_NUM }}_${{ env.TIMESTAMP }}"
path: |
dist
!dist/**/*.md
Expand Down

0 comments on commit f28129c

Please sign in to comment.