Skip to content

Commit

Permalink
chore: update release action (#636)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaslovato authored Sep 11, 2024
1 parent e539e78 commit 7794e4a
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,29 @@ jobs:
- name: Install dependencies
run: yarn install

- name: Set TARGET_BROWSER environment variable
run: echo "TARGET_BROWSER=chrome" >> $GITHUB_ENV

- name: Build project for Chrome
run: yarn run build:chrome

- name: List files in build directory
run: ls -l ./build

- name: Set asset name
id: set_asset_name
run: echo "ASSET_NAME=$(ls build | grep 'pali-wallet-chrome' | grep '.zip')" >> $GITHUB_ENV

- name: Get package version
id: get_version
run: echo "PACKAGE_VERSION=$(cat package.json | jq -r '.version')" >> $GITHUB_ENV

- name: Create a draft release
id: create_release
uses: actions/create-release@v1
with:
tag_name: v${{ github.event.repository.name }}-${{ github.ref_name }}-release
release_name: Release ${{ github.event.repository.name }} for ${{ github.ref_name }}
release_name: Release ${{ github.event.repository.name }} for ${{ github.ref_name }} (v${{ env.PACKAGE_VERSION }})
draft: true
prerelease: true
env:
Expand All @@ -44,8 +55,8 @@ jobs:
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/chrome.zip
asset_name: chrome.zip
asset_path: ./build/${{ env.ASSET_NAME }}
asset_name: ${{ env.ASSET_NAME }}
asset_content_type: application/zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 7794e4a

Please sign in to comment.