Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ACSancheZ authored Jun 14, 2024
1 parent 6f439c2 commit 723b316
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:

- name: Build the application
run: npm run build

- name: Check if release exists
id: check_release
run: |
Expand All @@ -42,13 +43,25 @@ jobs:
echo "Release already exists. Skipping release creation."
echo "RELEASE_ID=$RELEASE_ID" >> $GITHUB_ENV
fi
- name: Create release
id: create_release
if: steps.check_release.outputs.RELEASE_ID == ''
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false

- name: Upload main.js
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
upload_url: ${{ steps.create_release.outputs.upload_url || steps.check_release.outputs.upload_url }}
asset_path: main.js
asset_name: main.js
asset_content_type: application/javascript
Expand All @@ -58,7 +71,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
upload_url: ${{ steps.create_release.outputs.upload_url || steps.check_release.outputs.upload_url }}
asset_path: manifest.json
asset_name: manifest.json
asset_content_type: application/json

0 comments on commit 723b316

Please sign in to comment.