Skip to content

Commit

Permalink
fix(ci): correct artifact with the release version
Browse files Browse the repository at this point in the history
  • Loading branch information
henrycunh committed Apr 26, 2023
1 parent b454834 commit 6c61977
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/release-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
# Create a artifact with the release version, the name is the commit hash
run: |
mkdir -p artifacts
echo "${{ steps.release.outputs.release-version }}" > artifacts/${{ steps.script.outputs.ref }}.txt
echo "${{ steps.release.outputs.next-version }}" > artifacts/${{ github.ref }}.txt
- name: Upload release artifacts
uses: actions/upload-artifact@v2
Expand All @@ -61,8 +61,6 @@ jobs:
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v3
with:
fetch-depth: 0
ref: ${{ steps.script.outputs.ref }}
repository: ${{ steps.script.outputs.repo }}

- name: Deploy to Vercel
id: deploy
Expand Down Expand Up @@ -100,8 +98,6 @@ jobs:
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v3
with:
fetch-depth: 0
ref: ${{ steps.script.outputs.ref }}
repository: ${{ steps.script.outputs.repo }}

- name: Get release artifacts
uses: actions/download-artifact@v2
Expand All @@ -112,7 +108,7 @@ jobs:
- name: Read release version # and set as a output
id: release
run: |
echo "::set-output name=release-version::$(cat artifacts/${{ steps.script.outputs.ref }}.txt)"
echo "::set-output name=release-version::$(cat artifacts/${{ github.ref }}.txt)"
- name: Deta Space Deployment
uses: henrycunh/space-deployment-github-action@05e4e73d6801abed32a3580c8e794ea790fab827
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/release-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
# Create a artifact with the release version, the name is the commit hash
run: |
mkdir -p artifacts
echo "${{ steps.release.outputs.release-version }}" > artifacts/${{ steps.script.outputs.ref }}.txt
echo "${{ steps.release.outputs.next-version }}" > artifacts/${{ github.ref }}.txt
- name: Upload release artifacts
uses: actions/upload-artifact@v2
Expand All @@ -62,8 +62,6 @@ jobs:
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v3
with:
fetch-depth: 0
ref: ${{ steps.script.outputs.ref }}
repository: ${{ steps.script.outputs.repo }}

- name: Deploy to Vercel
id: deploy
Expand Down Expand Up @@ -97,8 +95,6 @@ jobs:
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v3
with:
fetch-depth: 0
ref: ${{ steps.script.outputs.ref }}
repository: ${{ steps.script.outputs.repo }}

- name: Get release artifacts
uses: actions/download-artifact@v2
Expand All @@ -109,7 +105,7 @@ jobs:
- name: Read release version # and set as a output
id: release
run: |
echo "::set-output name=release-version::$(cat artifacts/${{ steps.script.outputs.ref }}.txt)"
echo "::set-output name=release-version::$(cat artifacts/${{ github.ref }}.txt)"
- name: Deta Space Deployment
uses: henrycunh/space-deployment-github-action@05e4e73d6801abed32a3580c8e794ea790fab827
Expand Down

0 comments on commit 6c61977

Please sign in to comment.