Skip to content

Commit

Permalink
ci(release): skip upload when no release was created
Browse files Browse the repository at this point in the history
  • Loading branch information
pawcoding committed Aug 25, 2024
1 parent 5f4aa50 commit fa2b5a6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/release-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,14 @@ jobs:
# Create semantic release
- name: 🚀 Create semantic beta release
id: release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: pnpm run semantic-release

# Upload build artifacts
- name: 🚀 Upload beta build artifacts
if: steps.release.outputs.new_release_published == 'true'
uses: wlixcc/[email protected]
with:
username: ${{ secrets.FTP_USER }}
Expand All @@ -74,6 +76,7 @@ jobs:

# Purge unused old Angular files via custom script
- name: 🧹 Purge unused files
if: steps.release.outputs.new_release_published == 'true'
uses: fjogeleit/http-request-action@v1
with:
url: ${{ secrets.HTTP_PURGE_STAGING }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,14 @@ jobs:
# Create semantic release
- name: 🚀 Create semantic release
id: release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: pnpm run semantic-release

# Upload build artifacts
- name: 🚀 Upload build artifacts
if: steps.release.outputs.new_release_published == 'true'
uses: wlixcc/[email protected]
with:
username: ${{ secrets.FTP_USER }}
Expand All @@ -74,13 +76,15 @@ jobs:

# Purge unused old Angular files via custom script
- name: 🧹 Purge unused files
if: steps.release.outputs.new_release_published == 'true'
uses: fjogeleit/http-request-action@v1
with:
url: ${{ secrets.HTTP_PURGE }}
method: 'GET'

# Upload beta build artifacts
- name: 🚀 Upload build artifacts to beta
if: steps.release.outputs.new_release_published == 'true'
uses: wlixcc/[email protected]
with:
username: ${{ secrets.FTP_USER }}
Expand All @@ -93,6 +97,7 @@ jobs:

# Purge unused old Angular files via custom script
- name: 🧹 Purge unused files
if: steps.release.outputs.new_release_published == 'true'
uses: fjogeleit/http-request-action@v1
with:
url: ${{ secrets.HTTP_PURGE_STAGING }}
Expand Down

0 comments on commit fa2b5a6

Please sign in to comment.